[pkg-opensc-commit] [opensc] 217/295: fixed compiler warnings

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 0a254dc2bbac3a1bb49b295977246153391fc9a3
Author: Frank Morgner <frankmorgner at gmail.com>
Date:   Mon Mar 27 16:50:59 2017 +0200

    fixed compiler warnings
---
 src/libopensc/card-npa.c | 2 +-
 src/sm/sm-eac.c          | 2 +-
 src/sm/sm-iso.c          | 3 ++-
 src/sm/sslutil.h         | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/libopensc/card-npa.c b/src/libopensc/card-npa.c
index 8a2ac42..385d3a5 100644
--- a/src/libopensc/card-npa.c
+++ b/src/libopensc/card-npa.c
@@ -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;
 				}
diff --git a/src/sm/sm-eac.c b/src/sm/sm-eac.c
index 157e913..a41649b 100644
--- a/src/sm/sm-eac.c
+++ b/src/sm/sm-eac.c
@@ -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;
 	}
diff --git a/src/sm/sm-iso.c b/src/sm/sm-iso.c
index 5128823..c6c1435 100644
--- a/src/sm/sm-iso.c
+++ b/src/sm/sm-iso.c
@@ -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;
diff --git a/src/sm/sslutil.h b/src/sm/sslutil.h
index 9f65e36..7f5b072 100644
--- a/src/sm/sslutil.h
+++ b/src/sm/sslutil.h
@@ -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(); \
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list