From 0dc00633da6b1477e50184adda968dff6d862d50 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 18 Oct 2016 11:57:09 +0300 Subject: [PATCH] Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings * include/private/gc_priv.h [NO_GETENV] (GETENV): Do not define to NULL if CPPCHECK. --- include/private/gc_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 4e840246..e4c4cc45 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -567,7 +567,7 @@ GC_EXTERN GC_warn_proc GC_current_warn_proc; #ifdef GC_READ_ENV_FILE GC_INNER char * GC_envfile_getenv(const char *name); # define GETENV(name) GC_envfile_getenv(name) -#elif defined(NO_GETENV) +#elif defined(NO_GETENV) && !defined(CPPCHECK) # define GETENV(name) NULL #elif defined(EMPTY_GETENV_RESULTS) /* Workaround for a reputed Wine bug. */ -- 2.40.0