diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2015-03-31 14:49:10 -0400 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2015-04-30 16:05:48 +0300 |
commit | 4d1ba9c4f8a4d68b9d053946d551ffa8f1006b77 (patch) | |
tree | a14374b719983f05b47732631f1183bd142ef3d6 /hw/tpm/tpm_passthrough.c | |
parent | 070c7607f62f9623be9ff14623a43b0ca195c572 (diff) |
tpm: Modify DPRINTF to enable -Wformat checking
Modify DPRINTF to always enable -Wformat checking.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/tpm/tpm_passthrough.c')
-rw-r--r-- | hw/tpm/tpm_passthrough.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index 2a45071e36..73ca906282 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) \ |