]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/server: declare variable 'reqlogfile' static
authorFabian Keil <fk@fabiankeil.de>
Thu, 5 May 2022 09:53:08 +0000 (11:53 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Thu, 5 May 2022 09:55:06 +0000 (11:55 +0200)
Silences the warning:

     CC       socksd-socksd.o
   socksd.c:143:13: warning: no previous extern declaration for
    non-static variable 'reqlogfile' [-Wmissing-variable-declarations]
   const char *reqlogfile = DEFAULT_REQFILE;
               ^
   socksd.c:143:7: note: declare 'static' if the variable is not
    intended to be used outside of this translation unit
   const char *reqlogfile = DEFAULT_REQFILE;
         ^
   1 warning generated.

... when compiling with clang 13.

Closes: #8799
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
tests/server/socksd.c

index 1f0ca1287f4409bbee1aaee601dbd67884445110..080616545b2d05f73fd7c68a0ac27e3a714c8455 100644 (file)
@@ -140,7 +140,7 @@ struct configurable {
 static struct configurable config;
 
 const char *serverlogfile = DEFAULT_LOGFILE;
-const char *reqlogfile = DEFAULT_REQFILE;
+static const char *reqlogfile = DEFAULT_REQFILE;
 static const char *configfile = DEFAULT_CONFIG;
 
 static const char *socket_type = "IPv4";