[libwiicrypto] cert.c, cert_realsign_ticketOrTMD(): Remove duplicate initialization of hash_size.

Found using clang-tidy from clang-17.0.1.:

src/libwiicrypto/cert.c:533:4: warning: Value stored to 'hash_size' is never read [clang-analyzer-deadcode.DeadStores]
  533 |                         hash_size = SHA1_DIGEST_SIZE;
      |                         ^
src/libwiicrypto/cert.c:533:4: note: Value stored to 'hash_size' is never read
src/libwiicrypto/cert.c:537:4: warning: Value stored to 'hash_size' is never read [clang-analyzer-deadcode.DeadStores]
  537 |                         hash_size = SHA256_DIGEST_SIZE;
      |                         ^
src/libwiicrypto/cert.c:537:4: note: Value stored to 'hash_size' is never read
This commit is contained in:
David Korth 2024-02-20 23:53:09 -05:00
parent e3f6c26281
commit fdc8c01367

View File

@ -530,11 +530,9 @@ int cert_realsign_ticketOrTMD(uint8_t *data, size_t size, const RSA2048PrivateKe
// Determine the algorithm to use.
switch (be32_to_cpu(sig->type)) {
case RVL_CERT_SIGTYPE_RSA2048_SHA1:
hash_size = SHA1_DIGEST_SIZE;
doSHA256 = false;
break;
case WUP_CERT_SIGTYPE_RSA2048_SHA256:
hash_size = SHA256_DIGEST_SIZE;
doSHA256 = true;
break;
default: