Hello, Nathan Chancellor wrote: > 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.
Applied to mips-next. > commit 077ff3be06e8 > https://git.kernel.org/mips/c/077ff3be06e8 > > Fixes: c0ff3c53d4f9 ("MIPS: Enable HAVE_ARCH_TRACEHOOK.") > Link: https://github.com/ClangBuiltLinux/linux/issues/604 > Signed-off-by: Nathan Chancellor <natechancel...@gmail.com> > Signed-off-by: Paul Burton <paul.bur...@mips.com> Thanks, Paul [ This message was auto-generated; if you believe anything is incorrect then please email paul.bur...@mips.com to report it. ]