mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
make macros for pragma to compile with gcc11
This commit is contained in:
@ -14458,13 +14458,9 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
||||
}
|
||||
|
||||
/* myBuffer may not initialized fully, but the sending length will be */
|
||||
#if defined(__GNUC__) && __GNUC__ > 5
|
||||
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"");
|
||||
#endif
|
||||
PRAGMA_GCC_IGNORE("GCC diagnostic ignored \"-Wmaybe-uninitialized\"");
|
||||
ret = wolfSSL_write(ssl, myBuffer, sending);
|
||||
#if defined(__GNUC__) && __GNUC__ > 5
|
||||
_Pragma("GCC diagnostic pop");
|
||||
#endif
|
||||
PRAGMA_GCC_POP;
|
||||
|
||||
if (dynamic)
|
||||
XFREE(myBuffer, ssl->heap, DYNAMIC_TYPE_WRITEV);
|
||||
|
@ -437,15 +437,11 @@ static int DeriveKey(WOLFSSL* ssl, byte* output, int outputLen,
|
||||
hashOutSz = hashSz;
|
||||
|
||||
/* myBuffer may not initialized fully, but the sending length will be */
|
||||
#if defined(__GNUC__) && __GNUC__ > 5
|
||||
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"");
|
||||
#endif
|
||||
PRAGMA_GCC_IGNORE("GCC diagnostic ignored \"-Wmaybe-uninitialized\"");
|
||||
return HKDF_Expand_Label(output, outputLen, secret, hashSz,
|
||||
protocol, protocolLen, label, labelLen,
|
||||
hash, hashOutSz, digestAlg);
|
||||
#if defined(__GNUC__) && __GNUC__ > 5
|
||||
_Pragma("GCC diagnostic pop");
|
||||
#endif
|
||||
PRAGMA_GCC_POP;
|
||||
}
|
||||
|
||||
#ifndef NO_PSK
|
||||
|
@ -1053,6 +1053,14 @@ decouple library dependencies with standard string, memory and so on.
|
||||
#define WC_MP_TO_RADIX
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ > 5
|
||||
#define PRAGMA_GCC_IGNORE(str) _Pragma(str);
|
||||
#define PRAGMA_GCC_POP _Pragma("GCC diagnostic pop");
|
||||
#else
|
||||
#define PRAGMA_GCC_IGNORE(str)
|
||||
#define PRAGMA_GCC_POP
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user