From ff56f7589370ea2b524fa3b1e3b8aaf7ee0399a6 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Fri, 17 Feb 2017 14:25:59 +0100 Subject: [PATCH] Fixed format specifier and unused variables. --- channels/smartcard/client/smartcard_operations.c | 6 ++---- channels/smartcard/client/smartcard_pack.c | 11 ++++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/channels/smartcard/client/smartcard_operations.c b/channels/smartcard/client/smartcard_operations.c index ae0721b..1614942 100644 --- a/channels/smartcard/client/smartcard_operations.c +++ b/channels/smartcard/client/smartcard_operations.c @@ -1343,15 +1343,13 @@ static LONG smartcard_AccessStartedEvent_Decode(SMARTCARD_DEVICE* smartcard, static LONG smartcard_AccessStartedEvent_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERATION* operation) { - LONG status; - Long_Return ret; - status = ret.ReturnCode = SCARD_S_SUCCESS; + LONG status = SCARD_S_SUCCESS; if (!smartcard->StartedEvent) smartcard->StartedEvent = SCardAccessStartedEvent(); if (!smartcard->StartedEvent) - status = ret.ReturnCode = SCARD_E_NO_SERVICE; + status = SCARD_E_NO_SERVICE; return status; } diff --git a/channels/smartcard/client/smartcard_pack.c b/channels/smartcard/client/smartcard_pack.c index 0f80f8c..0f8312a 100644 --- a/channels/smartcard/client/smartcard_pack.c +++ b/channels/smartcard/client/smartcard_pack.c @@ -581,16 +581,17 @@ void smartcard_trace_list_reader_groups_call(SMARTCARD_DEVICE* smartcard, if (call->hContext.cbContext > 4) { - WLog_DBG(TAG, "hContext: 0x%02X%02X%02X%02X%02X%02X%02X%02X (%d)", + WLog_DBG(TAG, + "hContext: 0x%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8" (%"PRIu32")", pb[0], pb[1], pb[2], pb[3], pb[4], pb[5], pb[6], pb[7], call->hContext.cbContext); } else { - WLog_DBG(TAG, "hContext: 0x%02X%02X%02X%02X (%d)", + WLog_DBG(TAG, "hContext: 0x%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8" (%"PRIu32")", pb[0], pb[1], pb[2], pb[3], call->hContext.cbContext); } - WLog_DBG(TAG, "fmszGroupsIsNULL: %d cchGroups: 0x%08X", + WLog_DBG(TAG, "fmszGroupsIsNULL: %"PRId32" cchGroups: 0x%08"PRIx32, call->fmszGroupsIsNULL, call->cchGroups); WLog_DBG(TAG, "}"); } @@ -648,9 +649,9 @@ void smartcard_trace_list_reader_groups_return(SMARTCARD_DEVICE* smartcard, } WLog_DBG(TAG, "ListReaderGroups%s_Return {", unicode ? "W" : "A"); - WLog_DBG(TAG, "ReturnCode: %s (0x%08X)", + WLog_DBG(TAG, "ReturnCode: %s (0x%08"PRIx32")", SCardGetErrorString(ret->ReturnCode), ret->ReturnCode); - WLog_DBG(TAG, "cBytes: %d msz: %s", ret->cBytes, mszA); + WLog_DBG(TAG, "cBytes: %"PRIu32" msz: %s", ret->cBytes, mszA); WLog_DBG(TAG, "}"); free(mszA); } -- 2.7.4