diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2016-10-18 00:28:25 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2016-10-18 00:28:25 +0300 |
commit | 3964267d6b18ec66f72aedba0993535303fe8066 (patch) | |
tree | afe2c45ef0065543e26b3b351e5b7f548e411f84 /allchblk.c | |
parent | 957da90c6ff8084c48b7c8e3b4bcf6ecc83fb1b9 (diff) | |
download | bdwgc-3964267d6b18ec66f72aedba0993535303fe8066.tar.gz |
Workaround 'checking if unsigned value is negative' cppcheck warning
* allchblk.c [GC_ASSERTIONS && !USE_MUNMAP] (GC_add_to_fl): Replace
(signed_word)GC_heapsize<0 with (GC_heapsize&SIGNB)!=0.
Diffstat (limited to 'allchblk.c')
-rw-r--r-- | allchblk.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -362,10 +362,10 @@ STATIC void GC_add_to_fl(struct hblk *h, hdr *hhdr) hdr * prevhdr = HDR(prev); GC_ASSERT(nexthdr == 0 || !HBLK_IS_FREE(nexthdr) - || (signed_word)GC_heapsize < 0); + || (GC_heapsize & SIGNB) != 0); /* In the last case, blocks may be too large to merge. */ GC_ASSERT(prev == 0 || !HBLK_IS_FREE(prevhdr) - || (signed_word)GC_heapsize < 0); + || (GC_heapsize & SIGNB) != 0); # endif GC_ASSERT(((hhdr -> hb_sz) & (HBLKSIZE-1)) == 0); GC_hblkfreelist[index] = h; |