Skip to content

Commit

Permalink
Fix GCC -Wtype-limits warning with debug build.
Browse files Browse the repository at this point in the history
`offs >= 0` is no-op since `offs` is unsigned.
  • Loading branch information
yuyichao committed Dec 13, 2015
1 parent cafa0c9 commit 2925b03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,8 @@ static jl_value_t *jl_deserialize_value(ios_t *s, jl_value_t **loc)
else if (mode == MODE_MODULE_POSTWORK) {
offs >>= 1;
}
assert(offs >= 0 && offs < backref_list.len);
// assert(offs >= 0); // offs is unsigned so this is always true
assert(offs < backref_list.len);
jl_value_t *bp = (jl_value_t*)backref_list.items[offs];
assert(bp);
if (isdatatype && loc != NULL) {
Expand Down

0 comments on commit 2925b03

Please sign in to comment.