Wireshark mailing list archives
About Dead Store in clang Analysis
From: Alexis La Goutte <alexis.lagoutte () gmail com>
Date: Thu, 24 Mar 2011 20:56:26 +0100
Hi, I take a look in Clang Analysis report ( http://www.wireshark.org/download/automated/analysis/ ). And there is a lot of Dead increment Example : in the packet-ieee80211.c 6390 case TAG_POWER_CONSTRAINT: /* 7.3.2.15 Power Constraint element (32) */ 6391 { 6392 if (tag_len != 1) 6393 { 6394 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 1", tag_len); 6395 break; 6396 } 6397 offset += 2; 6398 6399 proto_tree_add_item(tree, hf_ieee80211_tag_power_constraint_local, tvb, offset, 1, TRUE); 6400 proto_item_append_text(ti, " :%d", tvb_get_guint8(tvb, offset)); 6401 offset += 1; Value stored to 'offset' is never read 6402 6403 break; 6404 } What it the official solution to fix this ? 1) Remove the code 2) Ignore this warning 3) Comment the code add a /* offset += 1; Remove Clang Dead increment */ Regards;
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- About Dead Store in clang Analysis Alexis La Goutte (Mar 24)
- Re: About Dead Store in clang Analysis Stephen Fisher (Mar 24)
- Re: About Dead Store in clang Analysis Dirk Jagdmann (Mar 24)
- Re: About Dead Store in clang Analysis Chris Maynard (Mar 24)
- Re: About Dead Store in clang Analysis Jeff Morriss (Mar 24)
- Re: About Dead Store in clang Analysis John Sullivan (Mar 24)
- Re: About Dead Store in clang Analysis Dirk Jagdmann (Mar 24)
- Re: About Dead Store in clang Analysis Guy Harris (Mar 24)
- Re: About Dead Store in clang Analysis Guy Harris (Mar 24)