@@ -58,7 +58,7 @@ static volatile int gWolfCryptRefCount = 0;
5858/******************************************************************************/
5959static TPM_RC TPM2_AcquireLock (TPM2_CTX * ctx )
6060{
61- #if defined(WOLFTPM2_NO_WOLFCRYPT ) || defined(SINGLE_THREADED )
61+ #if defined(WOLFTPM2_NO_WOLFCRYPT ) || defined(WOLFTPM_NO_LOCK )
6262 (void )ctx ;
6363#else
6464 int ret ;
@@ -86,7 +86,7 @@ static TPM_RC TPM2_AcquireLock(TPM2_CTX* ctx)
8686
8787static void TPM2_ReleaseLock (TPM2_CTX * ctx )
8888{
89- #if defined(WOLFTPM2_NO_WOLFCRYPT ) || defined(SINGLE_THREADED )
89+ #if defined(WOLFTPM2_NO_WOLFCRYPT ) || defined(WOLFTPM_NO_LOCK )
9090 (void )ctx ;
9191#else
9292 ctx -> lockCount -- ;
@@ -143,7 +143,7 @@ static int TPM2_CommandProcess(TPM2_CTX* ctx, TPM2_Packet* packet,
143143
144144#ifdef WOLFTPM_DEBUG_VERBOSE
145145 printf ("CommandProcess: Handles (Auth %d, In %d), CmdSz %d, AuthSz %d, ParamSz %d, EncSz %d\n" ,
146- info -> authCnt , info -> inHandleCnt , cmdSz , authSz , paramSz , encParamSz );
146+ info -> authCnt , info -> inHandleCnt , ( int ) cmdSz , ( int ) authSz , paramSz , encParamSz );
147147#else
148148 (void )paramSz ;
149149#endif
@@ -282,7 +282,7 @@ static int TPM2_ResponseProcess(TPM2_CTX* ctx, TPM2_Packet* packet,
282282
283283#ifdef WOLFTPM_DEBUG_VERBOSE
284284 printf ("ResponseProcess: Handles (Out %d), RespSz %d, ParamSz %d, DecSz %d, AuthSz %d\n" ,
285- info -> outHandleCnt , respSz , paramSz , decParamSz , respSz - authPos );
285+ info -> outHandleCnt , ( int ) respSz , ( int ) paramSz , ( int ) decParamSz , ( int )( respSz - authPos ) );
286286#endif
287287
288288 for (i = 0 ; i < info -> authCnt ; i ++ ) {
@@ -662,7 +662,7 @@ TPM_RC TPM2_Cleanup(TPM2_CTX* ctx)
662662 wc_FreeRng (& ctx -> rng );
663663 }
664664 #endif
665- #ifndef SINGLE_THREADED
665+ #ifndef WOLFTPM_NO_LOCK
666666 if (ctx -> hwLockInit ) {
667667 ctx -> hwLockInit = 0 ;
668668 wc_FreeMutex (& ctx -> hwLock );
0 commit comments