]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix warnings with 'strlcpy' macro
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 2 Jul 2016 13:38:17 +0000 (15:38 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 2 Jul 2016 19:56:40 +0000 (21:56 +0200)
The warnings were:
right-hand operand of comma expression has no effect [-Wunused-value]

pcap-int.h

index c5a030f5fe5435cebbe21bde9ecb873adb14423d..1d72adbd297856f9bdbcd6727ce3a0f1cc1ada2c 100644 (file)
@@ -368,7 +368,7 @@ int pcap_offline_read(pcap_t *, int, pcap_handler, u_char *);
 #define strlcpy(x, y, z) \
        (strncpy((x), (y), (z)), \
         ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')), \
-        strlen((y)))
+        (void) strlen((y)))
 #endif
 
 #include <stdarg.h>