diff --git a/src/precord.h b/src/precord.h index 4b475bc350..9104fb5f86 100644 --- a/src/precord.h +++ b/src/precord.h @@ -116,7 +116,7 @@ static inline void SET_LEN_PREC(Obj rec, UInt nr) static inline void SET_RNAM_PREC(Obj rec, UInt i, UInt rnam) { GAP_ASSERT(IS_PREC_OR_COMOBJ(rec)); - GAP_ASSERT(i <= CAPACITY_PREC(rec)); + GAP_ASSERT(i <= (UInt) CAPACITY_PREC(rec)); *(UInt *)(ADDR_OBJ(rec)+2*(i)) = rnam; } @@ -131,7 +131,7 @@ static inline void SET_RNAM_PREC(Obj rec, UInt i, UInt rnam) static inline UInt GET_RNAM_PREC(Obj rec, UInt i) { GAP_ASSERT(IS_PREC_OR_COMOBJ(rec)); - GAP_ASSERT(i <= CAPACITY_PREC(rec)); + GAP_ASSERT(i <= (UInt) CAPACITY_PREC(rec)); return *(const UInt *)(CONST_ADDR_OBJ(rec)+2*(i)); } @@ -146,7 +146,7 @@ static inline UInt GET_RNAM_PREC(Obj rec, UInt i) static inline void SET_ELM_PREC(Obj rec, UInt i, Obj val) { GAP_ASSERT(IS_PREC_OR_COMOBJ(rec)); - GAP_ASSERT(i <= CAPACITY_PREC(rec)); + GAP_ASSERT(i <= (UInt) CAPACITY_PREC(rec)); *(ADDR_OBJ(rec)+2*(i)+1) = val; } @@ -161,7 +161,7 @@ static inline void SET_ELM_PREC(Obj rec, UInt i, Obj val) static inline Obj GET_ELM_PREC(Obj rec, UInt i) { GAP_ASSERT(IS_PREC_OR_COMOBJ(rec)); - GAP_ASSERT(i <= CAPACITY_PREC(rec)); + GAP_ASSERT(i <= (UInt) CAPACITY_PREC(rec)); return *(CONST_ADDR_OBJ(rec)+2*(i)+1); } diff --git a/src/stringobj.h b/src/stringobj.h index 38682099a0..4802dba31b 100644 --- a/src/stringobj.h +++ b/src/stringobj.h @@ -206,7 +206,7 @@ static inline Obj GET_ELM_STRING(Obj list, Int pos) { GAP_ASSERT(IS_STRING_REP(list)); GAP_ASSERT(pos > 0); - GAP_ASSERT(pos <= GET_LEN_STRING(list)); + GAP_ASSERT((UInt) pos <= GET_LEN_STRING(list)); UChar c = CHARS_STRING(list)[pos - 1]; return ObjsChar[c]; } @@ -222,7 +222,7 @@ static inline void SET_ELM_STRING(Obj list, Int pos, Obj val) { GAP_ASSERT(IS_STRING_REP(list)); GAP_ASSERT(pos > 0); - GAP_ASSERT(pos <= GET_LEN_STRING(list)); + GAP_ASSERT((UInt) pos <= GET_LEN_STRING(list)); GAP_ASSERT(TNUM_OBJ(val) == T_CHAR); UChar * ptr = CHARS_STRING(list) + (pos - 1); *ptr = CHAR_VALUE(val);