aboutsummaryrefslogtreecommitdiff
path: root/pcap-netfilter-linux.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2021-06-23 13:53:18 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2021-06-23 14:12:35 +0200
commit0ac001846207133b45e474a2725905b62f0bc086 (patch)
tree95f07ccabab77b372d7a9b5da730d3f4a18b3d2d /pcap-netfilter-linux.c
parent160d5117cc1bee64b53b95de15e50cf78a775524 (diff)
downloadlibpcap-0ac001846207133b45e474a2725905b62f0bc086.tar.gz
Squelch a narrowing warning
Ignore the warning in the way to enable build with -Werror. To be look at before 2038... The warning was (clang 64 bits): ./pcap-netfilter-linux.c:346:12: warning: implicit conversion loses integer precision: 'time_t' (aka 'long') to 'unsigned int' [-Wshorten-64-to-32] seq_id = time(NULL); ~ ^~~~~~~~~~ (cherry picked from commit 16782c7e7811c2bc821c1f58ae948af7bccf81fe)
Diffstat (limited to 'pcap-netfilter-linux.c')
-rw-r--r--pcap-netfilter-linux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pcap-netfilter-linux.c b/pcap-netfilter-linux.c
index 17f528fc..d9550b02 100644
--- a/pcap-netfilter-linux.c
+++ b/pcap-netfilter-linux.c
@@ -33,6 +33,7 @@
#endif
#include "pcap-int.h"
+#include "diag-control.h"
#ifdef NEED_STRERROR_H
#include "strerror.h"
@@ -343,7 +344,9 @@ netfilter_send_config_msg(const pcap_t *handle, uint16_t msg_type, int ack, u_in
static unsigned int seq_id;
if (!seq_id)
+DIAG_OFF_NARROWING
seq_id = time(NULL);
+DIAG_ON_NARROWING
++seq_id;
nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nfgenmsg));