summaryrefslogtreecommitdiff
path: root/net/openvswitch
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-03-28 16:11:18 +0200
committerDavid S. Miller <davem@davemloft.net>2017-03-28 21:42:32 -0700
commit16b8b6de32572207abeb4dfb74ab7bd8409a5690 (patch)
tree80b548f5995aa6149d1bc89bf4663d7c32381c24 /net/openvswitch
parente497ec680c4cd51e76bfcdd49363d9ab8d32a757 (diff)
rocker: fix Wmaybe-uninitialized false-positive
gcc-7 reports a warning that earlier versions did not have: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_port_stp_update': arch/x86/include/asm/string_32.h:79:22: error: '*((void *)&prev_ctrls+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized] *((short *)to + 2) = *((short *)from + 2); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/rocker/rocker_ofdpa.c:2218:7: note: '*((void *)&prev_ctrls+4)' was declared here This is clearly a variation of the warning about 'prev_state' that was shut up using uninitialized_var(). We can slightly simplify the code and get rid of the warning by unconditionally saving the prev_state and prev_ctrls variables. The inlined memcpy is not particularly expensive here, as it just has to read five bytes from one or two cache lines. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch')
0 files changed, 0 insertions, 0 deletions