From 8de00d765168f04c236f2077b9550d6d3311a80b Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 24 May 2024 14:24:02 -0500 Subject: [PATCH] fix benign clang-analyzer-deadcode.DeadStores in pq crypto files introduced in 9a58301ab1. --- wolfcrypt/src/dilithium.c | 1 + wolfcrypt/src/falcon.c | 1 + wolfcrypt/src/sphincs.c | 1 + 3 files changed, 3 insertions(+) diff --git a/wolfcrypt/src/dilithium.c b/wolfcrypt/src/dilithium.c index f8559ccc5..c9df4f3db 100644 --- a/wolfcrypt/src/dilithium.c +++ b/wolfcrypt/src/dilithium.c @@ -489,6 +489,7 @@ static int parse_private_key(const byte* priv, word32 privSz, /* At this point, it is still a PKCS8 private key. */ if ((ret = ToTraditionalInline(priv, &idx, privSz)) < 0) { /* ignore error, did not have PKCS8 header */ + (void)ret; } /* Now it is a octet_string(concat(priv,pub)) */ diff --git a/wolfcrypt/src/falcon.c b/wolfcrypt/src/falcon.c index 08406d38d..2de19dc71 100644 --- a/wolfcrypt/src/falcon.c +++ b/wolfcrypt/src/falcon.c @@ -470,6 +470,7 @@ static int parse_private_key(const byte* priv, word32 privSz, /* At this point, it is still a PKCS8 private key. */ if ((ret = ToTraditionalInline(priv, &idx, privSz)) < 0) { /* ignore error, did not have PKCS8 header */ + (void)ret; } /* Now it is a octet_string(concat(priv,pub)) */ diff --git a/wolfcrypt/src/sphincs.c b/wolfcrypt/src/sphincs.c index 5659de178..05ba27fee 100644 --- a/wolfcrypt/src/sphincs.c +++ b/wolfcrypt/src/sphincs.c @@ -432,6 +432,7 @@ static int parse_private_key(const byte* priv, word32 privSz, /* At this point, it is still a PKCS8 private key. */ if ((ret = ToTraditionalInline(priv, &idx, privSz)) < 0) { /* ignore error, did not have PKCS8 header */ + (void)ret; } /* Now it is a octet_string(concat(priv,pub)) */