Skip to content

Commit 3f7985b

Browse files
committed
Fix for minor cast warning.
1 parent 197754b commit 3f7985b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/tpm_test_keys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int writeKeyBlob(const char* filename,
5151
rc = TPM2_AppendPublic(pubAreaBuffer, (word32)sizeof(pubAreaBuffer),
5252
&pubAreaSize, &key->pub);
5353
if (rc != TPM_RC_SUCCESS) return rc;
54-
if (pubAreaSize != (key->pub.size + sizeof(key->pub.size))) {
54+
if (pubAreaSize != (key->pub.size + (int)sizeof(key->pub.size))) {
5555
#ifdef DEBUG_WOLFTPM
5656
printf("writeKeyBlob: Sanity check for publicArea size failed\n");
5757
#endif
@@ -133,7 +133,7 @@ int readKeyBlob(const char* filename, WOLFTPM2_KEYBLOB* key)
133133
}
134134

135135
/* sanity check the sizes */
136-
if (pubAreaSize != (key->pub.size + sizeof(key->pub.size)) ||
136+
if (pubAreaSize != (key->pub.size + (int)sizeof(key->pub.size)) ||
137137
key->priv.size > sizeof(key->priv.buffer)) {
138138
printf("Struct size check failed (pub %d, priv %d)\n",
139139
key->pub.size, key->priv.size);

0 commit comments

Comments
 (0)