net/ice/base: fix strict-aliasing with GCC
authorAman Deep Singh <aman.deep.singh@intel.com>
Tue, 5 Oct 2021 11:57:54 +0000 (17:27 +0530)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 5 Oct 2021 14:59:06 +0000 (16:59 +0200)
commit16b809d144dc2df7f31695b5abc64a809021b154
tree4d8fac0fa201caa9089c1338eb425146303f50da
parent5abb634c14377f463337b5376eb993753d01aded
net/ice/base: fix strict-aliasing with GCC

Code changes done for build issue as reported in Bug 817
error: dereferencing type-punned pointer will break strict-aliasing rules.
added union to avoid pointer dereferencing

The build issue has been reported with both gcc 4.8.5 (RHEL 7) and
gcc 5.4.0 (Ubuntu 16.04).

Bugzilla ID: 817
Fixes: 39925373a333 ("net/ice/base: add parser execution main loop")

Signed-off-by: Aman Deep Singh <aman.deep.singh@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/ice/base/ice_parser_rt.c