From: Ivan Maidanski Date: Tue, 18 Oct 2016 10:26:34 +0000 (+0300) Subject: Workaround 'same expression on both sides of OR' cppcheck style warning X-Git-Tag: v8.0.0~1096 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c54dbac9b2913d1643e35510bae6b770827a0bc0;p=gc Workaround 'same expression on both sides of OR' cppcheck style warning * os_dep.c [USE_WINALLOC || CYGWIN32] (GC_mem_top_down): Define to non-zero value (MEM_TOP_DOWN) if CPPCHECK. --- diff --git a/os_dep.c b/os_dep.c index 1caf9887..315d33fb 100644 --- a/os_dep.c +++ b/os_dep.c @@ -2258,7 +2258,8 @@ void * os2_alloc(size_t bytes) # define GLOBAL_ALLOC_TEST GC_no_win32_dlls # endif -# if defined(GC_USE_MEM_TOP_DOWN) && defined(USE_WINALLOC) +# if (defined(GC_USE_MEM_TOP_DOWN) && defined(USE_WINALLOC)) \ + || defined(CPPCHECK) DWORD GC_mem_top_down = MEM_TOP_DOWN; /* Use GC_USE_MEM_TOP_DOWN for better 64-bit */ /* testing. Otherwise all addresses tend to */