fixed compiler warnings

This commit is contained in:
Frank Morgner 2017-03-27 16:50:59 +02:00
parent 428b134776
commit 0a254dc2bb
4 changed files with 5 additions and 4 deletions

View File

@ -528,7 +528,7 @@ static int npa_pace_verify(struct sc_card *card,
r = perform_pace(card, pace_input, &pace_output, EAC_TR_VERSION_2_02);
if (r == SC_SUCCESS) {
sc_log(card->ctx, "%s resumed.\n");
sc_log(card->ctx, "%s resumed.\n", npa_secret_name(pin_reference));
if (tries_left) {
*tries_left = MAX_PIN_TRIES;
}

View File

@ -539,7 +539,7 @@ static int npa_mse(sc_card_t *card,
if (apdu.resplen) {
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "MSE:Set AT response data should be empty "
"(contains %u bytes)", apdu.resplen);
"(contains %"SC_FORMAT_LEN_SIZE_T"u bytes)", apdu.resplen);
r = SC_ERROR_UNKNOWN_DATA_RECEIVED;
goto err;
}

View File

@ -591,7 +591,8 @@ static int sm_decrypt(const struct iso_sm_ctx *ctx, sc_card_t *card,
if (apdu->resplen < (size_t) r || (r && !apdu->resp)) {
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE,
"Response of SM APDU %u byte%s too long", r-apdu->resplen,
"Response of SM APDU %"SC_FORMAT_LEN_SIZE_T"u byte%s too long",
r-apdu->resplen,
r-apdu->resplen < 2 ? "" : "s");
r = SC_ERROR_OUT_OF_MEMORY;
goto err;

View File

@ -30,7 +30,7 @@
unsigned long _r; \
ERR_load_crypto_strings(); \
for (_r = ERR_get_error(); _r; _r = ERR_get_error()) { \
sc_debug(ctx, SC_LOG_DEBUG_VERBOSE, ERR_error_string(_r, NULL)); \
sc_debug(ctx, SC_LOG_DEBUG_VERBOSE, "%s", ERR_error_string(_r, NULL)); \
} \
ERR_free_strings(); \
}