[PATCH 18/19] ppc64: change %ld into %d
Mathieu Malaterre
malat at debian.org
Fri Mar 16 22:02:23 AEDT 2018
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 at debian.org>
---
arch/powerpc/xmon/xmon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
--
2.11.0
More information about the Linuxppc-dev
mailing list