Fix "maybe-uninitialized" warning

exp_array_size is always initialized if `rc == TPM_RC_SUCCESS` and never used
if `rc != TPM_RC_SUCCESS` but some compilers have trouble noticing this.

Signed-off-by: kpcyrd <git@rxv.cc>
This commit is contained in:
kpcyrd 2021-10-29 14:17:32 +02:00 committed by Stefan Berger
parent bf1f9c8d4e
commit d39256e2e8

View File

@ -3880,7 +3880,7 @@ PACompileConstants_Unmarshal(BYTE **buffer, INT32 *size)
unsigned i;
NV_HEADER hdr;
UINT32 array_size;
UINT32 exp_array_size;
UINT32 exp_array_size = 0;
if (rc == TPM_RC_SUCCESS) {
rc = NV_HEADER_Unmarshal(&hdr, buffer, size,