[PATCH -ocserv 1/5] main: Fix unused variable warning on !HAVE_LIBSYSTEMD builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes:

      CC       main.o
    main.c: In function ?listen_ports?:
    main.c:276:11: warning: unused variable ?fds? [-Wunused-variable]
      int ret, fds;
               ^
---
 src/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index 5b93f14..147e280 100644
--- a/src/main.c
+++ b/src/main.c
@@ -273,7 +273,10 @@ listen_ports(void *pool, struct cfg_st* config,
 {
 	struct addrinfo hints, *res;
 	char portname[6];
-	int ret, fds;
+	int ret;
+#ifdef HAVE_LIBSYSTEMD
+	int fds;
+#endif
 
 	list_head_init(&list->head);
 	list->total = 0;
-- 
1.9.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux