Skip to content

Commit 07c41c5

Browse files
add macro guard on test case
1 parent bab35c4 commit 07c41c5

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

wolfcrypt/src/cryptocb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static CryptoCb* wc_CryptoCb_FindDevice(int devId, int algoType)
195195
localDevId = CryptoCb_FindCb(devId, algoType);
196196
}
197197
#endif /* WOLF_CRYPTO_CB_FIND */
198+
(void)algoType;
198199
return wc_CryptoCb_GetDevice(localDevId);
199200
}
200201

wolfcrypt/test/test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45192,6 +45192,7 @@ static int myCryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
4519245192
}
4519345193

4519445194

45195+
#ifdef WOLF_CRYPTO_CB_FIND
4519545196
static int myCryptoCbFind(int currentId, int algoType)
4519645197
{
4519745198
/* can have algo specific overrides here
@@ -45214,6 +45215,7 @@ static int myCryptoCbFind(int currentId, int algoType)
4521445215
}
4521545216
return currentId;
4521645217
}
45218+
#endif /* WOLF_CRYPTO_CB_FIND */
4521745219

4521845220

4521945221
WOLFSSL_TEST_SUBROUTINE int cryptocb_test(void)
@@ -45228,7 +45230,9 @@ WOLFSSL_TEST_SUBROUTINE int cryptocb_test(void)
4522845230
/* set devId to something other than INVALID_DEVID */
4522945231
devId = 1;
4523045232
ret = wc_CryptoCb_RegisterDevice(devId, myCryptoDevCb, &myCtx);
45233+
#ifdef WOLF_CRYPTO_CB_FIND
4523145234
wc_CryptoCb_SetDeviceFindCb(myCryptoCbFind);
45235+
#endif /* WOLF_CRYPTO_CB_FIND */
4523245236
#ifndef WC_NO_RNG
4523345237
if (ret == 0)
4523445238
ret = random_test();

0 commit comments

Comments
 (0)