[PATCH 3/7] powerpc/sstep: Fix W=1 compile warning

Cédric Le Goater clg at kaod.org
Fri Sep 11 07:02:46 AEST 2020


../arch/powerpc/lib/sstep.c: In function ‘mlsd_8lsd_ea’:
../arch/powerpc/lib/sstep.c:225:3: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
   ; /* Invalid form. Should already be checked for by caller! */
   ^

Cc: Jordan Niethe <jniethe5 at gmail.com>
Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 arch/powerpc/lib/sstep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index caee8cc77e19..14572af16e55 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -221,8 +221,9 @@ static nokprobe_inline unsigned long mlsd_8lsd_ea(unsigned int instr,
 		; /* Leave ea as is */
 	else if (prefix_r && !ra)
 		ea += regs->nip;
-	else if (prefix_r && ra)
+	else if (prefix_r && ra) {
 		; /* Invalid form. Should already be checked for by caller! */
+	}
 
 	return ea;
 }
-- 
2.25.4



More information about the Linuxppc-dev mailing list