diff --git a/src/internal.c b/src/internal.c index 05005b64a..641536268 100644 --- a/src/internal.c +++ b/src/internal.c @@ -11281,6 +11281,7 @@ int wolfSSH_RsaVerify(const byte *sig, word32 sigSz, compare = ConstantCompare(encDigest, checkDigest, encDigestSz); if (checkDigestSz < 0 || sizeCompare || compare) { + (void)loc; // unused if log disabled WLOG(WS_LOG_DEBUG, "%s: %s", loc, "Bad RSA Verify"); ret = WS_RSA_E; } diff --git a/wolfssh/log.h b/wolfssh/log.h index 26f202124..7756f89a8 100644 --- a/wolfssh/log.h +++ b/wolfssh/log.h @@ -72,15 +72,17 @@ WOLFSSH_API int wolfSSH_LogEnabled(void); WOLFSSH_API void wolfSSH_Log(enum wolfSSH_LogLevel, const char *const, ...) FMTCHECK; +#if defined(DEBUG_WOLFSSH) || defined(WOLFSSH_SSHD) #define WLOG(...) do { \ if (wolfSSH_LogEnabled()) \ wolfSSH_Log(__VA_ARGS__); \ } while (0) - +#else +#define WLOG(...) +#endif #ifdef __cplusplus } #endif #endif /* _WOLFSSH_LOG_H_ */ -