lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Dec 2018 21:53:05 +0100
From:   Mathieu Malaterre <malat@...ian.org>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     Mathieu Malaterre <malat@...ian.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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]

Fixes: a225f1567405 ("powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call")
Signed-off-by: Mathieu Malaterre <malat@...ian.org>
---
 arch/powerpc/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 8314e8fed0ee..e1988892b3e7 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -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;
 	}
 
-- 
2.19.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ