From 7875cc5040f17b1b24e348143d8c568d1e5c3629 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 20 Dec 2018 02:10:04 +0300 Subject: [PATCH] Workaround 'argument dummy to GC_noop1 is always 1' cppcheck false positive * misc.c [!ALWAYS_SMALL_CLEAR_STACK && !STACK_NOT_SCANNED && !ASM_CLEAR_CODE && CPPCHECK] (GC_clear_stack_inner): Pass dummy[0] instead of address of dummy variable. --- misc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc.c b/misc.c index e56c3de2..2390796a 100644 --- a/misc.c +++ b/misc.c @@ -314,7 +314,11 @@ STATIC void GC_init_size_map(void) } /* Make sure the recursive call is not a tail call, and the bzero */ /* call is not recognized as dead code. */ - GC_noop1(COVERT_DATAFLOW(dummy)); +# if defined(CPPCHECK) + GC_noop1(dummy[0]); +# else + GC_noop1(COVERT_DATAFLOW(dummy)); +# endif return(arg); } # endif /* !ASM_CLEAR_CODE */ -- 2.40.0