diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-05-03 07:42:22 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-05-03 07:42:22 +0300 |
commit | 1cb1170d6092f8bc48c87af47fbea7915cf495d3 (patch) | |
tree | a9a4a759888ab87abe2f5cca3f0fa8b37850eaff | |
parent | 4f44ad7650605911b261a0d12b8dd90530374ca8 (diff) | |
download | bdwgc-1cb1170d6092f8bc48c87af47fbea7915cf495d3.tar.gz |
Workaround 'condition is always false' cppcheck FP in GC_setpagesize
(fix of commit 3af192338)
* os_dep.c [SOFT_VDB] (GC_setpagesize): Do not check that GC_page_size
value is a power of two if CPPCHECK.
-rw-r--r-- | os_dep.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -809,8 +809,10 @@ GC_INNER void GC_setpagesize(void) size_t pgsize; unsigned log_pgsize = 0; - if (((GC_page_size - 1) & GC_page_size) != 0) - ABORT("Invalid page size"); /* not a power of two */ +# if !defined(CPPCHECK) + if (((GC_page_size - 1) & GC_page_size) != 0) + ABORT("Invalid page size"); /* not a power of two */ +# endif for (pgsize = GC_page_size; pgsize > 1; pgsize >>= 1) log_pgsize++; GC_log_pagesize = log_pgsize; |