From f621a93081b2a8194d3e64ae5257a5e8b41df9e8 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 15 Oct 2021 00:04:25 -0500 Subject: [PATCH] more scan-build LLVM-13 fixes and expanded coverage: deadcode.DeadStores in client.c and server.c (no functional changes). --- examples/client/client.c | 6 +++--- examples/server/server.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index 9f44ffdbf..ff0505b95 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -3693,7 +3693,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) if (scr && forceScr) { if (nonBlocking) { if (!resumeScr) { - if ((ret = wolfSSL_Rehandshake(ssl)) != WOLFSSL_SUCCESS) { + if (wolfSSL_Rehandshake(ssl) != WOLFSSL_SUCCESS) { err = wolfSSL_get_error(ssl, 0); if (err == WOLFSSL_ERROR_WANT_READ || err == WOLFSSL_ERROR_WANT_WRITE) { @@ -3712,8 +3712,8 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) else { do { if (err == APP_DATA_READY) { - if ((ret = wolfSSL_read(ssl, reply, - sizeof(reply)-1)) < 0) { + if (wolfSSL_read(ssl, reply, + sizeof(reply)-1) < 0) { err_sys("APP DATA should be present " "but error returned"); } diff --git a/examples/server/server.c b/examples/server/server.c index 8a4627153..60c1ab579 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -3073,13 +3073,13 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args) defined(HAVE_SERVER_RENEGOTIATION_INFO) if (scr && forceScr) { if (nonBlocking) { - if ((ret = wolfSSL_Rehandshake(ssl)) != WOLFSSL_SUCCESS) { + if (wolfSSL_Rehandshake(ssl) != WOLFSSL_SUCCESS) { err = wolfSSL_get_error(ssl, 0); if (err == WOLFSSL_ERROR_WANT_READ || err == WOLFSSL_ERROR_WANT_WRITE) { do { if (err == APP_DATA_READY) { - if ((ret = wolfSSL_read(ssl, input, sizeof(input)-1)) < 0) { + if (wolfSSL_read(ssl, input, sizeof(input)-1) < 0) { err_sys("APP DATA should be present but error returned"); } printf("Received message: %s\n", input); @@ -3112,7 +3112,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args) } } } else { - if ((ret = wolfSSL_Rehandshake(ssl)) != WOLFSSL_SUCCESS) { + if (wolfSSL_Rehandshake(ssl) != WOLFSSL_SUCCESS) { #ifdef WOLFSSL_ASYNC_CRYPT err = wolfSSL_get_error(ssl, 0); while (err == WC_PENDING_E) {