File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
#include < chrono>
4
4
#include < iomanip>
5
5
#include < fstream>
6
+ #include < climits>
6
7
7
8
#include < libasr/asr.h>
8
9
#include < libasr/exception.h>
@@ -526,7 +527,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
526
527
527
528
using namespace wasm ;
528
529
int kind = ASRUtils::extract_kind_from_ttype_t (v->m_type );
529
- uint32_t global_var_idx = - 1 ;
530
+ uint32_t global_var_idx = UINT_MAX ;
530
531
switch (v->m_type ->type ){
531
532
case ASR::ttypeType::Integer: {
532
533
uint64_t init_val = 0 ;
@@ -583,7 +584,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
583
584
global_var_idx = m_wa.declare_global_var (i32, 0 );
584
585
}
585
586
}
586
- LCOMPILERS_ASSERT (global_var_idx >= 0 );
587
+ LCOMPILERS_ASSERT (global_var_idx < UINT_MAX );
587
588
m_global_var_idx_map[get_hash ((ASR::asr_t *)v)] = global_var_idx;
588
589
}
589
590
You can’t perform that action at this time.
0 commit comments