[PATCH] powerpc/ptrace: fix empty-body warning

Michael Ellerman mpe at ellerman.id.au
Wed Dec 19 11:22:19 AEDT 2018


Hi Mathieu,

Mathieu Malaterre <malat at debian.org> writes:
> In commit a225f1567405 ("powerpc/ptrace: replace ptrace_report_syscall()
> with a tracehook call") an empty body if(); was added.
>
> Replace ; with {} to remove a warning (treated as error) reported by gcc
> using W=1:
>
>   arch/powerpc/kernel/ptrace.c: In function ‘do_syscall_trace_enter’:
>   arch/powerpc/kernel/ptrace.c:3281:4: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
>
> Fixes: a225f1567405 ("powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call")
> Signed-off-by: Mathieu Malaterre <malat at debian.org>

Thanks for the fix, but this code is being refactored already in next,
see:

https://patchwork.ozlabs.org/patch/1014179/

cheers


More information about the Linuxppc-dev mailing list