From 6fad364daa69ee700eaad90036901c7ac7122b14 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Sun, 13 Nov 2016 17:49:37 +0100 Subject: ndpi_util: fix unused variable 'ip6_offset/ethernet_2/llc_off/cdp/slarp' [-Wunused-variable] --- example/ndpi_util.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'example/ndpi_util.c') diff --git a/example/ndpi_util.c b/example/ndpi_util.c index 34cb1f635..2b1eb0b3a 100644 --- a/example/ndpi_util.c +++ b/example/ndpi_util.c @@ -542,17 +542,11 @@ void ndpi_workflow_process_packet (struct ndpi_workflow * workflow, /* --- Ethernet header --- */ const struct ndpi_ethhdr *ethernet; - /* --- Ethernet II header --- */ - const struct ndpi_ethhdr *ethernet_2; /* --- LLC header --- */ const struct ndpi_llc_header *llc; /* --- Cisco HDLC header --- */ const struct ndpi_chdlc *chdlc; - /* --- SLARP frame --- */ - struct ndpi_slarp *slarp; - /* --- CDP --- */ - struct ndpi_cdp *cdp; /* --- Radio Tap header --- */ const struct ndpi_radiotap_header *radiotap; @@ -573,11 +567,10 @@ void ndpi_workflow_process_packet (struct ndpi_workflow * workflow, u_int16_t fc; u_int16_t type; int wifi_len = 0; - int llc_off; int pyld_eth_len = 0; int check; u_int64_t time; - u_int16_t ip_offset, ip_len, ip6_offset; + u_int16_t ip_offset, ip_len; u_int16_t frag_off = 0, vlan_id = 0; u_int8_t proto = 0; u_int32_t label; -- cgit v1.2.3 From d129abcde09567be32f0bc93d28fdffe2810b15d Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Sun, 13 Nov 2016 17:50:46 +0100 Subject: ndpi_util: unused variable 'nDPI_traceLevel' [-Wunused-const-variable] --- example/ndpi_util.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'example/ndpi_util.c') diff --git a/example/ndpi_util.c b/example/ndpi_util.c index 2b1eb0b3a..d5d0643e1 100644 --- a/example/ndpi_util.c +++ b/example/ndpi_util.c @@ -79,10 +79,6 @@ void ndpi_free_flow_info_half(struct ndpi_flow_info *flow) { /* ***************************************************** */ -static const u_int8_t nDPI_traceLevel = 0; - -/* ***************************************************** */ - extern u_int32_t current_ndpi_memory, max_ndpi_memory; /** -- cgit v1.2.3 From 3d6b4d4dffaef67d9f49380a39a248e7b7756da4 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Sun, 13 Nov 2016 18:19:38 +0100 Subject: ndpi_util: fix ‘type/ip_offset’ may be used uninitialized in this function [-Werror=maybe-uninitialized] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/ndpi_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example/ndpi_util.c') diff --git a/example/ndpi_util.c b/example/ndpi_util.c index d5d0643e1..df47b888c 100644 --- a/example/ndpi_util.c +++ b/example/ndpi_util.c @@ -561,12 +561,12 @@ void ndpi_workflow_process_packet (struct ndpi_workflow * workflow, u_int16_t eth_offset = 0; u_int16_t radio_len; u_int16_t fc; - u_int16_t type; + u_int16_t type = 0; int wifi_len = 0; int pyld_eth_len = 0; int check; u_int64_t time; - u_int16_t ip_offset, ip_len; + u_int16_t ip_offset = 0, ip_len; u_int16_t frag_off = 0, vlan_id = 0; u_int8_t proto = 0; u_int32_t label; -- cgit v1.2.3