]> granicus.if.org Git - gc/commitdiff
Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
authorIvan Maidanski <ivmai@mail.ru>
Tue, 18 Oct 2016 08:57:09 +0000 (11:57 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 31 Oct 2016 21:31:37 +0000 (00:31 +0300)
* include/private/gc_priv.h [NO_GETENV] (GETENV): Do not define to NULL
if CPPCHECK.

include/private/gc_priv.h

index b1efa4cf169a5fd09ca8a9d72a8488aea7ad03af..a9b05514c27724d24b11256a897417d845359213 100644 (file)
@@ -553,7 +553,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.   */