mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
ice: Suppress false-positive style issues reported by static analyzer
A recent version of cppcheck falsely reports- Variable ip.hdr is assigned a value that is never used. ip is a union so the pointer ip.hdr is actually used when referenced as ip.v4 and ip.v6. Silence these false reports when using cppcheck with the --inline-suppr command-line option. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
e40c899a64
commit
c3a6825e82
@ -1849,6 +1849,7 @@ int ice_tso(struct ice_tx_buf *first, struct ice_tx_offload_params *off)
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
/* cppcheck-suppress unreadVariable */
|
||||||
ip.hdr = skb_network_header(skb);
|
ip.hdr = skb_network_header(skb);
|
||||||
l4.hdr = skb_transport_header(skb);
|
l4.hdr = skb_transport_header(skb);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user