From 7bcebe82e7ff9d64f1d9bbdbe704a62fe6278751 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 9 Sep 2014 14:55:39 +0200 Subject: [PATCH] dissectors: 80211_mac_hdr: Fix clang warning clang gives the following warning about function meas_type(): proto_80211_mac_hdr.c:1704:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ Even though this is a false positive (since we check the entire range of an u8 in the switch/case), fix it by turning the case 13 ... 255 into default. Signed-off-by: Tobias Klauser --- proto_80211_mac_hdr.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/proto_80211_mac_hdr.c b/proto_80211_mac_hdr.c index d61bfe48..1c3b206d 100644 --- a/proto_80211_mac_hdr.c +++ b/proto_80211_mac_hdr.c @@ -1686,20 +1686,20 @@ static int8_t inf_ch_sw_ann(struct pkt_buff *pkt, u8 *id) static const char *meas_type(u8 type) { switch (type) { - case 0: return "Basic"; - case 1: return "Clear Channel assesment (CCA)"; - case 2: return "Receive power indication (RPI) histogram"; - case 3: return "Channel load"; - case 4: return "Noise histogram"; - case 5: return "Beacon"; - case 6: return "Frame"; - case 7: return "STA statistics"; - case 8: return "LCI"; - case 9: return "Transmit stream/category measurement"; - case 10: return "Multicast diagnostics"; - case 11: return "Location Civic"; - case 12: return "Location Identifier"; - case 13 ... 255: return "Reserved"; + case 0: return "Basic"; + case 1: return "Clear Channel assesment (CCA)"; + case 2: return "Receive power indication (RPI) histogram"; + case 3: return "Channel load"; + case 4: return "Noise histogram"; + case 5: return "Beacon"; + case 6: return "Frame"; + case 7: return "STA statistics"; + case 8: return "LCI"; + case 9: return "Transmit stream/category measurement"; + case 10: return "Multicast diagnostics"; + case 11: return "Location Civic"; + case 12: return "Location Identifier"; + default: return "Reserved"; } } -- 2.11.4.GIT