[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/42] tpm: Modify DPRINTF to enable -Wformat checkin
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 02/42] tpm: Modify DPRINTF to enable -Wformat checking |
Date: |
Thu, 30 Apr 2015 08:08:15 +0300 |
From: Stefan Berger <address@hidden>
Modify DPRINTF to always enable -Wformat checking.
Signed-off-by: Stefan Berger <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
hw/tpm/tpm_passthrough.c | 16 +++++++---------
hw/tpm/tpm_tis.c | 14 ++++++--------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index 2a45071..73ca906 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -34,15 +34,13 @@
#include "sysemu/tpm_backend_int.h"
#include "tpm_tis.h"
-/* #define DEBUG_TPM */
-
-#ifdef DEBUG_TPM
-#define DPRINTF(fmt, ...) \
- do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) \
- do { } while (0)
-#endif
+#define DEBUG_TPM 0
+
+#define DPRINTF(fmt, ...) do { \
+ if (DEBUG_TPM) { \
+ fprintf(stderr, fmt, ## __VA_ARGS__); \
+ } \
+} while (0);
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
#define TPM_PASSTHROUGH(obj) \
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index cb9c7c8..4b6d601 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -30,15 +30,13 @@
#include "qemu-common.h"
#include "qemu/main-loop.h"
-/*#define DEBUG_TIS */
+#define DEBUG_TIS 0
-#ifdef DEBUG_TIS
-#define DPRINTF(fmt, ...) \
- do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) \
- do { } while (0)
-#endif
+#define DPRINTF(fmt, ...) do { \
+ if (DEBUG_TIS) { \
+ printf(fmt, ## __VA_ARGS__); \
+ } \
+} while (0);
/* whether the STS interrupt is supported */
#define RAISE_STS_IRQ
--
2.1.4
- [Qemu-devel] [PULL 00/42] Trivial patches for 2015-04-30, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 10/42] qemu-config: remove stray inclusions of hw/ files, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 12/42] hostmem: Fix mem-path property name in error report, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 02/42] tpm: Modify DPRINTF to enable -Wformat checking,
Michael Tokarev <=
- [Qemu-devel] [PULL 05/42] ui/vnc : remove 'struct' of 'typedef struct', Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 03/42] bitops : fix coding style, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 27/42] microblaze: cpu: Remove unused CC_OP enum, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 20/42] configure: alphabetize tricore in target list, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 14/42] vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags(), Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 30/42] microblaze: cpu: delete unused cpu_interrupts_enabled, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 07/42] hw/display : remove 'struct' from 'typedef QXL struct', Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 18/42] util: Remove unused functions, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 38/42] target-mips: fix memory leak, Michael Tokarev, 2015/04/30
- [Qemu-devel] [PULL 13/42] qemu-options: trivial spelling fix (messsage), Michael Tokarev, 2015/04/30