lkml.org 
[lkml]   [2019]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 2/5] MIPS/ptrace: Update mips_get_syscall_arg's return type
    Date
    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 <natechancellor@gmail.com>
    > Signed-off-by: Paul Burton <paul.burton@mips.com>

    Thanks,
    Paul

    [ This message was auto-generated; if you believe anything is incorrect
    then please email paul.burton@mips.com to report it. ]

    \
     
     \ /
      Last update: 2019-08-12 06:47    [W:2.707 / U:0.392 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site