[PATCH] powerpc: Fix some compiler warnings
Anton Blanchard
anton at samba.org
Thu Jul 11 02:02:11 UTC 2013
Fix a number of differing signedness warnings when building on
powerpc.
Signed-off-by: Anton Blanchard <anton at samba.org>
---
Index: strace-new/syscall.c
===================================================================
--- strace-new.orig/syscall.c
+++ strace-new/syscall.c
@@ -975,23 +975,24 @@ static int powerpc_getregs_old(pid_t pid
long r;
if (iflag) {
- r = upeek(pid, sizeof(long) * PT_NIP, &ppc_regs.nip);
+ r = upeek(pid, sizeof(long) * PT_NIP, (long *)&ppc_regs.nip);
if (r)
goto out;
}
#ifdef POWERPC64 /* else we never use it */
- r = upeek(pid, sizeof(long) * PT_MSR, &ppc_regs.msr);
+ r = upeek(pid, sizeof(long) * PT_MSR, (long *)&ppc_regs.msr);
if (r)
goto out;
#endif
- r = upeek(pid, sizeof(long) * PT_CCR, &ppc_regs.ccr);
+ r = upeek(pid, sizeof(long) * PT_CCR, (long *)&ppc_regs.ccr);
if (r)
goto out;
- r = upeek(pid, sizeof(long) * PT_ORIG_R3, &ppc_regs.orig_gpr3);
+ r = upeek(pid, sizeof(long) * PT_ORIG_R3, (long *)&ppc_regs.orig_gpr3);
if (r)
goto out;
for (i = 0; i <= 8; i++) {
- r = upeek(pid, sizeof(long) * (PT_R0 + i), &ppc_regs.gpr[i]);
+ r = upeek(pid, sizeof(long) * (PT_R0 + i),
+ (long *)&ppc_regs.gpr[i]);
if (r)
goto out;
}
More information about the Strace-devel
mailing list