[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH 01/11] trace: Fix format string for the struct tim
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH 01/11] trace: Fix format string for the struct timeval members casted to size_t |
Date: |
Thu, 21 Jun 2018 14:12:47 -0300 |
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("address@hidden: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("address@hidden: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é <address@hidden>
---
scripts/tracetool/backend/log.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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("address@hidden:%(name)s " %(fmt)s "\\n",',
+ ' qemu_log("address@hidden:%(name)s " %(fmt)s "\\n",',
' getpid(),',
' (size_t)_now.tv_sec, (size_t)_now.tv_usec',
' %(argnames)s);',
--
2.18.0.rc2
- [Qemu-trivial] [PATCH 00/11] hw: various conversions to trace-events, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 01/11] trace: Fix format string for the struct timeval members casted to size_t,
Philippe Mathieu-Daudé <=
- [Qemu-trivial] [PATCH 02/11] sdcard: Reduce sdcard_set_blocklen() trace digits, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 03/11] hw/char/serial: Convert from DPRINTF macro to trace events, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 04/11] hw/char/parallel: Convert from pdebug() macro to trace events, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 06/11] hw/input/tsc2005: Convert a fprintf() call to trace events, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 07/11] hw/net/ne2000: Add trace events, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 08/11] hw/net/ne2000: Convert printf() calls to trace events, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 09/11] hw/net/etraxfs_eth: Convert printf() calls to trace events, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 10/11] hw/block/fdc: Convert from FLOPPY_DPRINTF() macro to trace events, Philippe Mathieu-Daudé, 2018/06/21