mirror of https://github.com/wolfSSL/wolfssl.git
multi-test fixes: whitespace in wolfcrypt/src/random.c and wolfcrypt/test/test.c, bugprone-macro-parentheses and -Wenum-compare in WS_RETURN_CODE() (wolfssl/ssl.h), and clang-analyzer-deadcode.DeadStores in api.c.
parent
04e2b6c62a
commit
008c8509c6
|
@ -51361,7 +51361,7 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bidirectional shutdown */
|
/* bidirectional shutdown */
|
||||||
while ((ret = wolfSSL_shutdown(ssl)) != WOLFSSL_SUCCESS) {
|
while (wolfSSL_shutdown(ssl) != WOLFSSL_SUCCESS) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51433,7 +51433,7 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_client_thread(void* args)
|
||||||
}
|
}
|
||||||
} while (ret != WOLFSSL_SUCCESS && err == WC_PENDING_E);
|
} while (ret != WOLFSSL_SUCCESS && err == WC_PENDING_E);
|
||||||
|
|
||||||
ret = wolfSSL_write(ssl, msg, len);
|
AssertIntGE(wolfSSL_write(ssl, msg, len), 0);
|
||||||
|
|
||||||
if (0 < (idx = wolfSSL_read(ssl, input, sizeof(input)-1))) {
|
if (0 < (idx = wolfSSL_read(ssl, input, sizeof(input)-1))) {
|
||||||
input[idx] = 0;
|
input[idx] = 0;
|
||||||
|
|
|
@ -2793,14 +2793,14 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||||
int wc_hwrng_generate_block(byte *output, word32 sz)
|
int wc_hwrng_generate_block(byte *output, word32 sz)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int len;
|
int len;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
fd = open("/dev/hwrng", O_RDONLY);
|
fd = open("/dev/hwrng", O_RDONLY);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return OPEN_RAN_E;
|
return OPEN_RAN_E;
|
||||||
while(sz)
|
while(sz)
|
||||||
{
|
{
|
||||||
len = (int)read(fd, output, sz);
|
len = (int)read(fd, output, sz);
|
||||||
if (len == -1)
|
if (len == -1)
|
||||||
{
|
{
|
||||||
ret = READ_RAN_E;
|
ret = READ_RAN_E;
|
||||||
|
|
|
@ -22081,7 +22081,7 @@ static int ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerifyCount,
|
||||||
}
|
}
|
||||||
#endif /* HAVE_ECC_VERIFY */
|
#endif /* HAVE_ECC_VERIFY */
|
||||||
#endif /* HAVE_ECC_SIGN */
|
#endif /* HAVE_ECC_SIGN */
|
||||||
#endif /* !ECC_TIMING_RESISTANT || (ECC_TIMING_RESISTANT &&
|
#endif /* !ECC_TIMING_RESISTANT || (ECC_TIMING_RESISTANT &&
|
||||||
* !WC_NO_RNG && !WOLFSSL_KCAPI_ECC) */
|
* !WC_NO_RNG && !WOLFSSL_KCAPI_ECC) */
|
||||||
|
|
||||||
#if defined(HAVE_ECC_KEY_EXPORT) && !defined(WC_NO_RNG) && \
|
#if defined(HAVE_ECC_KEY_EXPORT) && !defined(WC_NO_RNG) && \
|
||||||
|
|
|
@ -786,7 +786,7 @@ enum SNICbReturn {
|
||||||
*/
|
*/
|
||||||
#if defined(WOLFSSL_ERROR_CODE_OPENSSL)
|
#if defined(WOLFSSL_ERROR_CODE_OPENSSL)
|
||||||
#define WS_RETURN_CODE(item1,item2) \
|
#define WS_RETURN_CODE(item1,item2) \
|
||||||
((item1 < 0) ? item2 : item1)
|
(((item1) < 0) ? (int)(item2) : (int)(item1))
|
||||||
#else
|
#else
|
||||||
#define WS_RETURN_CODE(item1,item2) (item1)
|
#define WS_RETURN_CODE(item1,item2) (item1)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue