From: Ivan Maidanski Date: Tue, 18 Oct 2016 08:57:09 +0000 (+0300) Subject: Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings X-Git-Tag: v8.0.0~1101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0dc00633da6b1477e50184adda968dff6d862d50;p=gc 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. --- 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. */