Skip to content

Commit 8362397

Browse files
committed
Fix cast warning with g++.
1 parent a4fc54b commit 8362397

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/tpm2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5355,7 +5355,7 @@ int TPM2_GetName(TPM2_CTX* ctx, UINT32 handleValue, int handleCnt, int idx, TPM2
53555355

53565356
void TPM2_SetupPCRSel(TPML_PCR_SELECTION* pcr, TPM_ALG_ID alg, int pcrIndex)
53575357
{
5358-
if (pcr && pcrIndex >= PCR_FIRST && pcrIndex <= PCR_LAST) {
5358+
if (pcr && pcrIndex >= (int)PCR_FIRST && pcrIndex <= (int)PCR_LAST) {
53595359
pcr->count = 1;
53605360
pcr->pcrSelections[0].hash = alg;
53615361
pcr->pcrSelections[0].sizeofSelect = PCR_SELECT_MIN;

src/tpm2_wrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2512,7 +2512,7 @@ int wolfTPM2_ReadPCR(WOLFTPM2_DEV* dev, int pcrIndex, int hashAlg, byte* digest,
25122512
PCR_Read_Out pcrReadOut;
25132513
int digestLen = 0;
25142514

2515-
if (dev == NULL || pcrIndex < PCR_FIRST || pcrIndex > PCR_LAST)
2515+
if (dev == NULL || pcrIndex < (int)PCR_FIRST || pcrIndex > (int)PCR_LAST)
25162516
return BAD_FUNC_ARG;
25172517

25182518
/* set session auth to blank */

0 commit comments

Comments
 (0)