From 8eb6b5a3e480d448812a5b40dc0ef7507a7a8ac9 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 24 Jan 2025 00:34:41 -0700 Subject: [PATCH] clang tidy unused parameter warning --- src/tls13.c | 4 +++- src/x509.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tls13.c b/src/tls13.c index d17d9681f..674827014 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -6917,8 +6917,10 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx, ERROR_OUT(INVALID_PARAMETER, exit_dch); } /* suites and compression length check */ - if ((args->idx - args->begin) + ssl->clSuites->suiteSz + OPAQUE8_LEN > helloSz) + if ((args->idx - args->begin) + ssl->clSuites->suiteSz + OPAQUE8_LEN > + helloSz) { ERROR_OUT(BUFFER_ERROR, exit_dch); + } if (ssl->clSuites->suiteSz > WOLFSSL_MAX_SUITE_SZ) ERROR_OUT(BUFFER_ERROR, exit_dch); XMEMCPY(ssl->clSuites->suites, input + args->idx, ssl->clSuites->suiteSz); diff --git a/src/x509.c b/src/x509.c index b6a04c360..6daf40cb1 100644 --- a/src/x509.c +++ b/src/x509.c @@ -5382,6 +5382,9 @@ static WOLFSSL_X509* loadX509orX509REQFromBuffer( WOLFSSL_ERROR(ret); } + /* unused parameter when built without WOLFSSL_ENCRYPTED_KEYS */ + (void)cb; + (void)u; return x509; }