aboutsummaryrefslogtreecommitdiff
path: root/scripts/tracetool
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-21 14:12:47 -0300
committerStefan Hajnoczi <stefanha@redhat.com>2018-06-29 15:04:18 +0100
commit82c4f87e0ed1701c1f51a46a3146643ed89b0bef (patch)
treef12a0fa1d3c7adb91f039aebdcd1f118ba560d0b /scripts/tracetool
parent749c1d8e3e12c44247927d8f72f68ec0c0266f8b (diff)
trace: Fix format string for the struct timeval members casted to size_t
This fixes when using GCC with -Wformat-signedness: migration/trace.h: In function ‘_nocheck__trace_dirty_bitmap_load_success’: migration/trace.h:6368:24: error: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘long unsigned int’ [-Werror=format=] qemu_log("%d@%zd.%06zd:dirty_bitmap_load_success " "" "\n", ~~^ %ld migration/trace.h:6370:18: (size_t)_now.tv_sec, (size_t)_now.tv_usec ~~~~~~~~~~~~~~~~~~~ migration/trace.h:6368:30: error: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 4 has type ‘long unsigned int’ [-Werror=format=] qemu_log("%d@%zd.%06zd:dirty_bitmap_load_success " "" "\n", ~~~~^ %06ld migration/trace.h:6370:39: (size_t)_now.tv_sec, (size_t)_now.tv_usec ~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/tracetool')
-rw-r--r--scripts/tracetool/backend/log.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
index 78933d03ad..6751f41bc5 100644
--- a/scripts/tracetool/backend/log.py
+++ b/scripts/tracetool/backend/log.py
@@ -38,7 +38,7 @@ def generate_h(event, group):
out(' if (%(cond)s && qemu_loglevel_mask(LOG_TRACE)) {',
' struct timeval _now;',
' gettimeofday(&_now, NULL);',
- ' qemu_log("%%d@%%zd.%%06zd:%(name)s " %(fmt)s "\\n",',
+ ' qemu_log("%%d@%%zu.%%06zu:%(name)s " %(fmt)s "\\n",',
' getpid(),',
' (size_t)_now.tv_sec, (size_t)_now.tv_usec',
' %(argnames)s);',