fixes for gcc 11 compile and other whitespace

This commit is contained in:
Elms
2021-05-19 13:44:31 -07:00
parent 0e23d40250
commit 7127dbeeec
3 changed files with 62 additions and 47 deletions

View File

@ -14457,7 +14457,14 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
idx += (int)iov[i].iov_len;
}
/* myBuffer may not initialized fully, but the sending length will be */
#if defined(__GNUC__) && __GNUC__ > 5
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"");
#endif
ret = wolfSSL_write(ssl, myBuffer, sending);
#if defined(__GNUC__) && __GNUC__ > 5
_Pragma("GCC diagnostic pop");
#endif
if (dynamic)
XFREE(myBuffer, ssl->heap, DYNAMIC_TYPE_WRITEV);

View File

@ -421,6 +421,7 @@ static int DeriveKey(WOLFSSL* ssl, byte* output, int outputLen,
#endif
default:
ret = HASH_TYPE_E;
break;
}
if (ret != 0)
@ -435,9 +436,16 @@ static int DeriveKey(WOLFSSL* ssl, byte* output, int outputLen,
if (includeMsgs)
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
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
}
#ifndef NO_PSK