From 3516c88b84ad101ffb55425f5950b650819a7abf Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 23 Jan 2025 16:15:49 -0600 Subject: [PATCH] fixes for clang-tidy complaints with NO_ERROR_STRINGS. --- wolfcrypt/benchmark/benchmark.c | 2 +- wolfssl/wolfcrypt/error-crypt.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 78e64c7f99..dffd1b8fc7 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -586,7 +586,7 @@ #undef LIBCALL_CHECK_RET #if defined(NO_STDIO_FILESYSTEM) || defined(NO_ERROR_STRINGS) || \ defined(NO_MAIN_DRIVER) || defined(BENCH_EMBEDDED) -#define LIBCALL_CHECK_RET(...) __VA_ARGS__ +#define LIBCALL_CHECK_RET(...) (void)(__VA_ARGS__) #else #define LIBCALL_CHECK_RET(...) do { \ int _libcall_ret = (__VA_ARGS__); \ diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index 19d5eef821..aadc367457 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -326,7 +326,7 @@ wc_static_assert((int)MIN_CODE_E <= (int)WC_SPAN2_MIN_CODE_E); #ifdef NO_ERROR_STRINGS #define wc_GetErrorString(error) "no support for error strings built in" #define wc_ErrorString(err, buf) \ - (void)err; XSTRNCPY((buf), wc_GetErrorString((err)), \ + (void)(err); XSTRNCPY((buf), wc_GetErrorString(err), \ WOLFSSL_MAX_ERROR_SZ); #else