include: Use "do { } while (0)" when VKD3D_NO_{TRACE, DEBUG}_MESSAGES is defined.

In order to handle the following construct correctly:

  if (...) TRACE(...);

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-04-26 12:37:01 +02:00 committed by Alexandre Julliard
parent d5d1ee4031
commit 1172e66f6d
1 changed files with 3 additions and 3 deletions

View File

@ -24,12 +24,12 @@
#include <stdarg.h>
#ifdef VKD3D_NO_TRACE_MESSAGES
#define TRACE(args...)
#define TRACE(args...) do { } while (0)
#endif
#ifdef VKD3D_NO_DEBUG_MESSAGES
#define WARN(args...)
#define FIXME(args...)
#define WARN(args...) do { } while (0)
#define FIXME(args...) do { } while (0)
#endif
enum vkd3d_dbg_level