]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
lastenv is only used in setenv.
authorDarren Tucker <dtucker@dtucker.net>
Tue, 27 Jul 2021 07:45:34 +0000 (17:45 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 27 Jul 2021 07:45:34 +0000 (17:45 +1000)
Prevents an unused variable warning on platforms that have setenv but
not unsetenv.

openbsd-compat/setenv.c

index 373b701d9c6feac53635593f5a9db1a238e5944b..86954c284ee3b74e8fe93c63793c64fc04c0317c 100644 (file)
@@ -39,7 +39,9 @@
 #include <string.h>
 
 extern char **environ;
+#ifndef HAVE_SETENV
 static char **lastenv;                         /* last value of environ */
+#endif
 
 /* OpenSSH Portable: __findenv is from getenv.c rev 1.8, made static */
 /*