wolfcrypt: logging: use do{}while(0) to disable WOLFSSL_MSG* macro

otherwise statement of the type:

if (condtion)
    WOLFSSL_MSG("");

after preprocessing will become:

if (condition)
    ;

The empty body emits a warning from the compiler.
This commit is contained in:
Marco Oliverio
2022-05-09 10:56:13 +02:00
parent 59fdf05155
commit 8e3d7fc6f4

View File

@@ -177,9 +177,9 @@ WOLFSSL_API void wolfSSL_Debugging_OFF(void);
#define WOLFSSL_STUB(m)
#define WOLFSSL_IS_DEBUG_ON() 0
#define WOLFSSL_MSG_EX(m, ...)
#define WOLFSSL_MSG(m)
#define WOLFSSL_BUFFER(b, l)
#define WOLFSSL_MSG_EX(m, ...) do{} while(0)
#define WOLFSSL_MSG(m) do{} while(0)
#define WOLFSSL_BUFFER(b, l) do{} while(0)
#endif /* DEBUG_WOLFSSL && !WOLFSSL_DEBUG_ERRORS_ONLY */