Skip to content
Snippets Groups Projects
Commit b80666bf authored by Eric Blake's avatar Eric Blake Committed by Kevin Wolf
Browse files

vdi: Avoid bitrot of debugging code


Rework the debug define so that we always get -Wformat checking,
even when debugging is disabled.

Signed-off-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarStefan Weil <sw@weilnetz.de>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: default avatarFam Zheng <famz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 47943e98
No related branches found
No related tags found
No related merge requests found
......@@ -87,12 +87,18 @@
#define DEFAULT_CLUSTER_SIZE (1 * MiB)
#if defined(CONFIG_VDI_DEBUG)
#define logout(fmt, ...) \
fprintf(stderr, "vdi\t%-24s" fmt, __func__, ##__VA_ARGS__)
#define VDI_DEBUG 1
#else
#define logout(fmt, ...) ((void)0)
#define VDI_DEBUG 0
#endif
#define logout(fmt, ...) \
do { \
if (VDI_DEBUG) { \
fprintf(stderr, "vdi\t%-24s" fmt, __func__, ##__VA_ARGS__); \
} \
} while (0)
/* Image signature. */
#define VDI_SIGNATURE 0xbeda107f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment