]> granicus.if.org Git - strace/commitdiff
Cast current_wordsize to an int
authorMike Frysinger <vapier@gentoo.org>
Fri, 27 Apr 2012 22:58:20 +0000 (18:58 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 27 Apr 2012 23:38:24 +0000 (23:38 +0000)
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'

Since on multi-personality systems this is an array of ints, cast
the multiplication to an int and update the printf format.

* count.c (call_summary): Change %u to %d and cast first argument to int.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
count.c

diff --git a/count.c b/count.c
index d05ec60fc3875c59b5413531963f7faa463a7c21..9496b0453c4e73ddc8ce34a5f2d76135a07aac99 100644 (file)
--- a/count.c
+++ b/count.c
@@ -219,8 +219,8 @@ call_summary(FILE *outf)
                        set_personality(i);
                if (i)
                        fprintf(outf,
-                               "System call usage summary for %u bit mode:\n",
-                               current_wordsize * 8);
+                               "System call usage summary for %d bit mode:\n",
+                               (int) (current_wordsize * 8));
                call_summary_pers(outf);
        }