powerpc/ptrace: fix empty-body warning
Subsystems (2)
PATCH 1/1 powerpc/ptrace: fix empty-body warning
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]
--- arch/powerpc/kernel/ptrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/ptrace.c +2 -2
@@ -3277,8 +3277,8 @@ long do_syscall_trace_enter(struct pt_regs *regs)* avoid clobbering any register also, thus, not 'gotoing' * skip label. */ -if (tracehook_report_syscall_entry (regs)) - ; +if (tracehook_report_syscall_entry (regs)) { + }return -1 ; }
Signature · 1 line
2.19.2
Michael Ellerman
reviewerHi Mathieu,
Quoted 11 lines · Mathieu Malaterre
In commit
a225f1567405("powerpc/ptrace: replaceptrace_report_syscall()with a tracehook call") an empty bodyif(); 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 <[email protected]>
Thanks for the fix, but this code is being refactored already in next, see:
https://patchwork.ozlabs.org/patch/1014179/
cheers