Commit dbab0459 by Michael Schubert

tests-clar/core: fix non-null warning

gcc 4.7.0 apparently doesn't see that we won't call setenv with NULL as
second argument.
parent 29ef309e
...@@ -48,8 +48,11 @@ static int cl_setenv(const char *name, const char *value) ...@@ -48,8 +48,11 @@ static int cl_setenv(const char *name, const char *value)
#include <stdlib.h> #include <stdlib.h>
#define cl_getenv(n) getenv(n) #define cl_getenv(n) getenv(n)
#define cl_setenv(n,v) (v) ? setenv((n),(v),1) : unsetenv(n)
static int cl_setenv(const char *name, const char *value)
{
return (value == NULL) ? unsetenv(name) : setenv(name, value, 1);
}
#endif #endif
#ifdef GIT_WIN32 #ifdef GIT_WIN32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment