From 35fe2034c1d6089217bb91f8c4da2f9afbb88d4d Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 22 Aug 2018 18:26:02 +0200 Subject: [PATCH] PSA_MAC_FINAL_SIZE: we don't use key_bits at the moment None of the currently defined MAC algorithms have a MAC size that depends on the key size, so the key_bits parameter is unused. The key_type parameter may be unused on an implementation where there is no block cipher MAC. Declare the key_type and key_bits parameters as used so that callers who define a variable just for this don't risk getting "unused variable" warnings. --- include/psa/crypto_sizes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/psa/crypto_sizes.h b/include/psa/crypto_sizes.h index 988c43f5a..4aa7cd89e 100644 --- a/include/psa/crypto_sizes.h +++ b/include/psa/crypto_sizes.h @@ -162,7 +162,7 @@ #define PSA_MAC_FINAL_SIZE(key_type, key_bits, alg) \ (PSA_ALG_IS_HMAC(alg) ? PSA_HASH_SIZE(PSA_ALG_HMAC_GET_HASH(alg)) : \ PSA_ALG_IS_BLOCK_CIPHER_MAC(alg) ? PSA_BLOCK_CIPHER_BLOCK_SIZE(key_type) : \ - 0) + ((void)(key_type), (void)(key_bits), 0)) /** The maximum size of the output of psa_aead_encrypt(), in bytes. *