From c54dbac9b2913d1643e35510bae6b770827a0bc0 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 18 Oct 2016 13:26:34 +0300 Subject: [PATCH] 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. --- os_dep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os_dep.c b/os_dep.c index 1caf988..315d33f 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 */ -- 2.7.4