[PATCH] cast current_wordsize to an int
dvlasenk at redhat.com
Tue May 15 12:32:30 UTC 2012
On 04/28/2012 12:58 AM, Mike Frysinger wrote:
> On 64bit systems with a single personality, we see:
> count.c: In function 'call_summary':
> count.c:223:5: warning: format '%u' expects type 'unsigned int',
> but argument 3 has type 'long unsigned int'
Ah, I see.
# define PERSONALITY0_WORDSIZE sizeof(long)
# define set_personality(personality) ((void)0)
# define current_personality 0
# define current_wordsize PERSONALITY0_WORDSIZE
This is how current_wordsize can be long. In other cases
it will be int. The correct fix is to use (int)(sizeof(long)),
ensuring that current_wordsize always has type "int".
I'll fix it in git...
More information about the Strace-devel