diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-08-11 20:31:17 -0700 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2019-08-11 21:44:30 -0700 |
commit | 077ff3be06e8de2657075dd2738b9a21f8ebd890 (patch) | |
tree | df6b697f8b914c2d0fea2ef567aa693db00557a8 /net/ipv6/xfrm6_policy.c | |
parent | c2869aafe7191d366d74c55cb8a93c6d0baba317 (diff) | |
download | linux-077ff3be06e8de2657075dd2738b9a21f8ebd890.tar.bz2 |
MIPS/ptrace: Update mips_get_syscall_arg's return type
clang warns:
arch/mips/include/asm/syscall.h:136:3: error: variable 'ret' is
uninitialized when used here [-Werror,-Wuninitialized]
ret |= mips_get_syscall_arg(args++, task, regs, i++);
^~~
arch/mips/include/asm/syscall.h:129:9: note: initialize the variable
'ret' to silence this warning
int ret;
^
= 0
1 error generated.
It's not wrong; however, it's not an issue in practice because ret is
only assigned to, not read from. ret could just be initialized to zero
but looking into it further, ret has been unused since it was first
added in 2012 so just get rid of it and update mips_get_syscall_arg's
return type since none of the return values are ever checked. If it is
ever needed again, this commit can be reverted and ret can be properly
initialized.
Fixes: c0ff3c53d4f9 ("MIPS: Enable HAVE_ARCH_TRACEHOOK.")
Link: https://github.com/ClangBuiltLinux/linux/issues/604
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: clang-built-linux@googlegroups.com
Diffstat (limited to 'net/ipv6/xfrm6_policy.c')
0 files changed, 0 insertions, 0 deletions