diff mbox series

[18/19] ppc64: change %ld into %d

Message ID 20180316110224.12260-19-malat@debian.org (mailing list archive)
State Superseded
Headers show
Series Start using __printf attribute (single commit series) | expand

Commit Message

Mathieu Malaterre March 16, 2018, 11:02 a.m. UTC
CC      arch/powerpc/xmon/xmon.o
../arch/powerpc/xmon/xmon.c: In function ‘prregs’:
../arch/powerpc/xmon/xmon.c:1665:17: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Werror=format=]
    printf("R%.2ld = "REG"   R%.2ld = "REG"\n",
                 ^
../arch/powerpc/xmon/xmon.c:1665:11: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Werror=format=]
    printf("R%.2ld = "REG"   R%.2ld = "REG"\n",
           ^~~~~~~~~~~
../arch/powerpc/xmon/xmon.c:1669:17: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Werror=format=]
    printf("R%.2ld = "REG"   R%.2ld = "REG"\n",
                 ^
../arch/powerpc/xmon/xmon.c:1669:11: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Werror=format=]
    printf("R%.2ld = "REG"   R%.2ld = "REG"\n",
           ^~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/xmon/xmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 4479245c6361..a87f14a24849 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1662,11 +1662,11 @@  static void prregs(struct pt_regs *fp)
 #ifdef CONFIG_PPC64
 	if (FULL_REGS(fp)) {
 		for (n = 0; n < 16; ++n)
-			printf("R%.2ld = "REG"   R%.2ld = "REG"\n",
+			printf("R%.2d = "REG"   R%.2d = "REG"\n",
 			       n, fp->gpr[n], n+16, fp->gpr[n+16]);
 	} else {
 		for (n = 0; n < 7; ++n)
-			printf("R%.2ld = "REG"   R%.2ld = "REG"\n",
+			printf("R%.2d = "REG"   R%.2d = "REG"\n",
 			       n, fp->gpr[n], n+7, fp->gpr[n+7]);
 	}
 #else