From: Paul Donald Date: Thu, 25 Apr 2024 02:02:04 +0000 (+0200) Subject: Fix macos warnings at compile time. X-Git-Tag: 1.0.19~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3c9f9ee559b6aa14be5d01cf8bdb0c854f330f0;p=thirdparty%2Flldpd.git Fix macos warnings at compile time. If this happens: lldpd.c:1577:14: warning: variable 'pidfile' set but not used [-Wunused-but-set-variable] const char *pidfile = LLDPD_PID_FILE; Then the other places using pidfile should get the same ifndef treatment --- diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c index 54864753..0f30f426 100644 --- a/src/daemon/lldpd.c +++ b/src/daemon/lldpd.c @@ -1574,7 +1574,9 @@ lldpd_main(int argc, char *argv[], char *envp[]) char *platform_override = NULL; char *lsb_release = NULL; const char *lldpcli = LLDPCLI_PATH; +#ifndef HOST_OS_OSX const char *pidfile = LLDPD_PID_FILE; +#endif int smart = 15; int receiveonly = 0, version = 0; int ctl; @@ -1621,9 +1623,11 @@ lldpd_main(int argc, char *argv[], char *envp[]) case 'D': log_accept(optarg); break; +#ifndef HOST_OS_OSX case 'p': pidfile = optarg; break; +#endif case 'r': receiveonly = 1; break;