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:10:16 +0200
commit16782c7e7811c2bc821c1f58ae948af7bccf81fe (patch)
treed64a5e35c6ff793bd7153b16a5bb667474aaf35f /pcap-netfilter-linux.c
parentae784d8e1d67bbc6797df2c508639349fe569389 (diff)
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); ~ ^~~~~~~~~~
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));