From 35346a6fe682705e36f51534cd5ab54ed7192cbe Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 27 Apr 2016 09:46:26 +0200 Subject: ring: Mark potentially unused parameters as such The parameters to tpacket_uhdr_vlan_tci() and tpacket_uhdr_vlan_proto() might be unused, depending on the definition of HAVE_TPACKET3 and TP_STATUS_VLAN_TPID_VALID. Thus, mark them with __maybe_unused to prevent -Wunused-parameter warnings. Signed-off-by: Tobias Klauser --- ring.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ring.h b/ring.h index 971e8de..1886781 100644 --- a/ring.h +++ b/ring.h @@ -48,7 +48,8 @@ union tpacket_uhdr { (((hdr).h2)->member) #endif /* HAVE_TPACKET3 */ -static inline uint16_t tpacket_uhdr_vlan_tci(union tpacket_uhdr *hdr, bool v3) +static inline uint16_t tpacket_uhdr_vlan_tci(union tpacket_uhdr *hdr __maybe_unused, + bool v3 __maybe_unused) { #ifdef HAVE_TPACKET3 if (v3) @@ -57,7 +58,8 @@ static inline uint16_t tpacket_uhdr_vlan_tci(union tpacket_uhdr *hdr, bool v3) return 0; } -static inline uint16_t tpacket_uhdr_vlan_proto(union tpacket_uhdr *hdr, bool v3) +static inline uint16_t tpacket_uhdr_vlan_proto(union tpacket_uhdr *hdr __maybe_unused, + bool v3 __maybe_unused) { #if defined(HAVE_TPACKET3) && defined(TP_STATUS_VLAN_TPID_VALID) if (v3) -- cgit v1.2.3-54-g00ecf