summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-03-22 17:18:43 +0300
committerDavid S. Miller <davem@davemloft.net>2019-03-24 04:48:30 +0300
commit526949e877f44672d408bfe291e39860c13f2e24 (patch)
tree31458a80362a0cfc6ea601f65746db740d16044f /init
parent737889efe9713a0f20a75fd0de952841d9275e6b (diff)
downloadlinux-526949e877f44672d408bfe291e39860c13f2e24.tar.xz
rxrpc: avoid clang -Wuninitialized warning
clang produces a false-positive warning as it fails to notice that "lost = true" implies that "ret" is initialized: net/rxrpc/output.c:402:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (lost) ^~~~ net/rxrpc/output.c:437:6: note: uninitialized use occurs here if (ret >= 0) { ^~~ net/rxrpc/output.c:402:2: note: remove the 'if' if its condition is always false if (lost) ^~~~~~~~~ net/rxrpc/output.c:339:9: note: initialize the variable 'ret' to silence this warning int ret, opt; ^ = 0 Rearrange the code to make that more obvious and avoid the warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions