Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bruce Allan and committed by
Jeff Kirsher
c3a6825e e40c899a

+1
+1
drivers/net/ethernet/intel/ice/ice_txrx.c
··· 1849 1849 if (err < 0) 1850 1850 return err; 1851 1851 1852 + /* cppcheck-suppress unreadVariable */ 1852 1853 ip.hdr = skb_network_header(skb); 1853 1854 l4.hdr = skb_transport_header(skb); 1854 1855