From 62b5d0985f042c8939a664240c7e5a5216e745b4 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 11 Aug 2013 14:42:50 +0200 Subject: [PATCH] dissector: proto_ipv6: Fix compiler warnings Mark unused parameters with __maybe_unused in order to prevent -Wunused-parameter compiler warnings. Signed-off-by: Tobias Klauser --- proto_ipv6_dest_opts.c | 3 ++- proto_ipv6_hop_by_hop.c | 3 ++- proto_ipv6_mobility_hdr.c | 2 +- proto_ipv6_no_nxt_hdr.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/proto_ipv6_dest_opts.c b/proto_ipv6_dest_opts.c index dfdd2568..696b6e2d 100644 --- a/proto_ipv6_dest_opts.c +++ b/proto_ipv6_dest_opts.c @@ -22,7 +22,8 @@ struct dest_optshdr { } __packed; -static void dissect_opt_dest(struct pkt_buff *pkt, ssize_t *opt_len) +static void dissect_opt_dest(struct pkt_buff *pkt __maybe_unused, + ssize_t *opt_len) { /* Have to been upgraded. * http://tools.ietf.org/html/rfc2460#section-4.2 diff --git a/proto_ipv6_hop_by_hop.c b/proto_ipv6_hop_by_hop.c index b0c5a0d4..26f338af 100644 --- a/proto_ipv6_hop_by_hop.c +++ b/proto_ipv6_hop_by_hop.c @@ -21,7 +21,8 @@ struct hop_by_hophdr { uint8_t hdr_len; } __packed; -static void dissect_opt_hop (struct pkt_buff *pkt, ssize_t *opt_len) +static void dissect_opt_hop(struct pkt_buff *pkt __maybe_unused, + ssize_t *opt_len) { /* Have to been upgraded. * http://tools.ietf.org/html/rfc2460#section-4.2 diff --git a/proto_ipv6_mobility_hdr.c b/proto_ipv6_mobility_hdr.c index 57e587fd..33994e1e 100644 --- a/proto_ipv6_mobility_hdr.c +++ b/proto_ipv6_mobility_hdr.c @@ -78,7 +78,7 @@ struct bind_err_msg { } __packed; -static void dissect_mobility_options(struct pkt_buff *pkt, +static void dissect_mobility_options(struct pkt_buff *pkt __maybe_unused, ssize_t *message_data_len) { /* Have to been upgraded. diff --git a/proto_ipv6_no_nxt_hdr.c b/proto_ipv6_no_nxt_hdr.c index 1988422a..c1ef3d09 100644 --- a/proto_ipv6_no_nxt_hdr.c +++ b/proto_ipv6_no_nxt_hdr.c @@ -15,7 +15,7 @@ #include "dissector_eth.h" #include "built_in.h" -static void no_next_header(struct pkt_buff *pkt) +static void no_next_header(struct pkt_buff *pkt __maybe_unused) { /* * The value 59 in the Next Header field of an IPv6 header or any @@ -29,7 +29,7 @@ static void no_next_header(struct pkt_buff *pkt) tprintf(" ]\n"); } -static void no_next_header_less(struct pkt_buff *pkt) +static void no_next_header_less(struct pkt_buff *pkt __maybe_unused) { tprintf(" No Next Header"); } -- 2.11.4.GIT