From f4881e9220b2c40c369b72f14154d707745ffd7d Mon Sep 17 00:00:00 2001 From: gojimmypi Date: Thu, 11 Jan 2024 15:55:04 -0800 Subject: [PATCH] Simplify "misc.c does not need to be compiled" --- src/misc.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/misc.c b/src/misc.c index 3a9fb5d5..f78eb72a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -53,21 +53,11 @@ /* Check for if compiling misc.c when not needed. */ #if !defined(WOLFSSH_MISC_INCLUDED) && !defined(NO_INLINE) && \ !defined(WOLFSSH_IGNORE_FILE_WARN) - #define MISC_WARNING "misc.c does not need to be compiled when using inline (NO_INLINE not defined))" - #define MISC_STRINGIFY(x) #x - #define MISC_TOSTRING(x) MISC_STRINGIFY(x) - #ifdef __STDC_VERSION__ - #if __STDC_VERSION__ >= 199901L - #define PRAGMA_SUPPORTED 1 - #endif - #endif - #if (defined(__GNUC__) || defined(__clang__)) && defined(PRAGMA_SUPPORTED) - _Pragma(MISC_TOSTRING(message(MISC_WARNING))) - #elif defined(_MSC_VER) - #pragma message("warning: " MISC_WARNING) + #ifndef _MSC_VER + #warning "misc.c does not need to be compiled when using inline (NO_INLINE not defined))" #else - #warning MISC_WARNING + #pragma message("warning: misc.c does not need to be compiled when using inline (NO_INLINE not defined))") #endif #else /* !WOLFSSL_MISC_INCLUDED && !NO_INLINE && !WOLFSSH_IGNORE_FILE_WARN */