Skip to content

Commit

Permalink
Workaround 'division by zero' cppcheck FP in gctest.c
Browse files Browse the repository at this point in the history
(fix of commit 1cac9b5)

Issue #627 (bdwgc).

* include/gc/gc_tiny_fl.h [CPPCHECK && GC_GRANULE_BYTES==1]
(GC_GRANULE_BYTES): Undefine (before ifdef GC_GRANULE_BYTES).
  • Loading branch information
ivmai committed Jul 24, 2024
1 parent c3489b6 commit 6fea3f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/gc/gc_tiny_fl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
/* GC_GRANULE_BYTES should not be overridden in any instances of the GC */
/* library that may be shared between applications, since it affects */
/* the binary interface to the library. */
#if defined(CPPCHECK) && GC_GRANULE_BYTES == 1
# undef GC_GRANULE_BYTES
#endif
#ifdef GC_GRANULE_BYTES
# define GC_GRANULE_PTRS (GC_GRANULE_BYTES / GC_SIZEOF_PTR)
#else
Expand Down

0 comments on commit 6fea3f1

Please sign in to comment.