From 4bacc25e22bb1bee7ad7da11c395b4599b1a5064 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 29 Nov 2022 17:09:05 -0600 Subject: [PATCH] examples/benchmark/tls_bench.c: fix for clang-analyzer-deadcode.DeadStores in bench_tls(). --- examples/benchmark/tls_bench.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/benchmark/tls_bench.c b/examples/benchmark/tls_bench.c index 4373d196b..f6c9f0d20 100644 --- a/examples/benchmark/tls_bench.c +++ b/examples/benchmark/tls_bench.c @@ -2040,7 +2040,9 @@ int bench_tls(void* args) /* parse by : */ while ((cipher != NULL) && (cipher[0] != '\0')) { +#if ! (defined(WOLFSSL_TLS13) && defined(HAVE_SUPPORTED_CURVES)) const char *gname = "N/A"; +#endif next_cipher = strchr(cipher, ':'); if (next_cipher != NULL) { cipher[next_cipher - cipher] = '\0'; @@ -2052,7 +2054,8 @@ int bench_tls(void* args) #if defined(WOLFSSL_TLS13) && defined(HAVE_SUPPORTED_CURVES) for (group_index = 0; groups[group_index].name != NULL; group_index++) { - gname = theadInfo[0].group == 0 ? "N/A" : groups[group_index].name; + const char *gname = theadInfo[0].group == 0 ? "N/A" + : groups[group_index].name; if (argDoGroups && groups[group_index].group == 0) { /* Skip unsupported group. */