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>
This commit is contained in:
parent
070c7607f6
commit
4d1ba9c4f8
@ -34,15 +34,13 @@
|
|||||||
#include "sysemu/tpm_backend_int.h"
|
#include "sysemu/tpm_backend_int.h"
|
||||||
#include "tpm_tis.h"
|
#include "tpm_tis.h"
|
||||||
|
|
||||||
/* #define DEBUG_TPM */
|
#define DEBUG_TPM 0
|
||||||
|
|
||||||
#ifdef DEBUG_TPM
|
#define DPRINTF(fmt, ...) do { \
|
||||||
#define DPRINTF(fmt, ...) \
|
if (DEBUG_TPM) { \
|
||||||
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
|
fprintf(stderr, fmt, ## __VA_ARGS__); \
|
||||||
#else
|
} \
|
||||||
#define DPRINTF(fmt, ...) \
|
} while (0);
|
||||||
do { } while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
|
#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
|
||||||
#define TPM_PASSTHROUGH(obj) \
|
#define TPM_PASSTHROUGH(obj) \
|
||||||
|
@ -30,15 +30,13 @@
|
|||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "qemu/main-loop.h"
|
#include "qemu/main-loop.h"
|
||||||
|
|
||||||
/*#define DEBUG_TIS */
|
#define DEBUG_TIS 0
|
||||||
|
|
||||||
#ifdef DEBUG_TIS
|
#define DPRINTF(fmt, ...) do { \
|
||||||
#define DPRINTF(fmt, ...) \
|
if (DEBUG_TIS) { \
|
||||||
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
|
printf(fmt, ## __VA_ARGS__); \
|
||||||
#else
|
} \
|
||||||
#define DPRINTF(fmt, ...) \
|
} while (0);
|
||||||
do { } while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* whether the STS interrupt is supported */
|
/* whether the STS interrupt is supported */
|
||||||
#define RAISE_STS_IRQ
|
#define RAISE_STS_IRQ
|
||||||
|
Loading…
x
Reference in New Issue
Block a user