The report is a false positive because result (returned by mmap) should
be equal to start_addr (passed to mmap).
* os_dep.c [USE_MUNMAP && !USE_WINALLOC] (GC_unmap, GC_unmap_gap): Call
GC_noop1(result) if CPPCHECK (same as for LINT2).
* os_dep.c [USE_MUNMAP && !USE_WINALLOC && NACL] (GC_remap): Likewise.
zero_fd, 0/* offset */);
if (result != (void *)start_addr)
ABORT("mmap(PROT_NONE) failed");
-# ifdef LINT2
+# if defined(CPPCHECK) || defined(LINT2)
/* Explicitly store the resource handle to a global variable. */
GC_noop1((word)result);
# endif
zero_fd, 0 /* offset */);
if (result != (void *)start_addr)
ABORT("mmap as mprotect failed");
-# ifdef LINT2
+# if defined(CPPCHECK) || defined(LINT2)
GC_noop1((word)result);
# endif
# else
zero_fd, 0/* offset */);
if (result != (void *)start_addr)
ABORT("mmap(PROT_NONE) failed");
-# ifdef LINT2
+# if defined(CPPCHECK) || defined(LINT2)
GC_noop1((word)result);
# endif
GC_unmapped_bytes += len;