]> git.baikalelectronics.ru Git - kernel.git/commit
arp: fixed -Wuninitialized compiler warning
authorIhar Hrachyshka <ihrachys@redhat.com>
Wed, 24 May 2017 22:19:35 +0000 (15:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 May 2017 17:38:20 +0000 (13:38 -0400)
commitd889ed28749c6fe3bcc22c77289b999915b7832c
tree28108a28ba1863c260df7228e2a5f51c0f981113
parent00c00b3683a914fb8f4e27781e327a7e65b520e4
arp: fixed -Wuninitialized compiler warning

Commit 6340eecdaa0c20e68c6ba226eaa15b102bffaf0f ("arp: always override
existing neigh entries with gratuitous ARP") introduced a compiler
warning:

net/ipv4/arp.c:880:35: warning: 'addr_type' may be used uninitialized in
this function [-Wmaybe-uninitialized]

While the code logic seems to be correct and doesn't allow the variable
to be used uninitialized, and the warning is not consistently
reproducible, it's still worth fixing it for other people not to waste
time looking at the warning in case it pops up in the build environment.
Yes, compiler is probably at fault, but we will need to accommodate.

Fixes: 6340eecdaa0c ("arp: always override existing neigh entries with gratuitous ARP")
Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/arp.c