From: Denys Vlasenko Date: Thu, 18 Jul 2013 15:40:45 +0000 (+0200) Subject: I386: fix signedness mismatch warning X-Git-Tag: v4.9~189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e600ac67ee7b11600773e73ab9772392dd6e6d04;p=strace I386: fix signedness mismatch warning &i386_regs.esp is a pointer to long, not unsigned long. It needs a cast. Signed-off-by: Denys Vlasenko --- diff --git a/syscall.c b/syscall.c index 02c08679..1b49bb3c 100644 --- a/syscall.c +++ b/syscall.c @@ -678,7 +678,8 @@ getrval2(struct tcb *tcp) #if defined(I386) static struct user_regs_struct i386_regs; -uint32_t *const i386_esp_ptr = &i386_regs.esp; +/* Cast suppresses signedness warning (.esp is long, not unsigned long) */ +uint32_t *const i386_esp_ptr = (uint32_t*)&i386_regs.esp; # define ARCH_REGS_FOR_GETREGSET i386_regs #elif defined(X86_64) || defined(X32) /*