From e9b2f5729c87aab5857171e6cd2859f3548c4b96 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Mon, 14 May 2012 13:47:31 +0000 Subject: [PATCH] Fix a bunch of warnings. --- examples/nfc-emulate-tag.c | 1 + examples/nfc-emulate-uid.c | 1 + examples/nfc-relay.c | 1 + libnfc/drivers/acr122_usb.c | 4 +++- utils/nfc-relay-picc.c | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/nfc-emulate-tag.c b/examples/nfc-emulate-tag.c index 29d46a2..91faacf 100644 --- a/examples/nfc-emulate-tag.c +++ b/examples/nfc-emulate-tag.c @@ -63,6 +63,7 @@ static bool init_mfc_auth = false; static void intr_hdlr (int sig) { + (void) sig; printf ("\nQuitting...\n"); if (pnd != NULL) { nfc_close(pnd); diff --git a/examples/nfc-emulate-uid.c b/examples/nfc-emulate-uid.c index 5a616dd..e15c868 100644 --- a/examples/nfc-emulate-uid.c +++ b/examples/nfc-emulate-uid.c @@ -68,6 +68,7 @@ uint8_t abtSak[9] = { 0x08, 0xb6, 0xdd }; static void intr_hdlr (int sig) { + (void) sig; if (pnd != NULL) { printf ("\nAborting current command...\n"); nfc_abort_command (pnd); diff --git a/examples/nfc-relay.c b/examples/nfc-relay.c index 68283f3..760d6a9 100644 --- a/examples/nfc-relay.c +++ b/examples/nfc-relay.c @@ -63,6 +63,7 @@ static bool quitting = false; static void intr_hdlr (int sig) { + (void) sig; printf ("\nQuitting...\n"); quitting = true; return; diff --git a/libnfc/drivers/acr122_usb.c b/libnfc/drivers/acr122_usb.c index 8553fc8..2659edb 100644 --- a/libnfc/drivers/acr122_usb.c +++ b/libnfc/drivers/acr122_usb.c @@ -495,6 +495,7 @@ RDR_to_PC_DataBlock SW: more data: 8 bytes static size_t acr122_build_frame (uint8_t *frame, const size_t frame_len, const uint8_t *data, const size_t data_len) { + (void) frame_len; frame[1] = data_len + 6; frame[14] = data_len + 1; memcpy (frame + 16, data, data_len); @@ -579,7 +580,7 @@ read: size_t len = abtRxBuf[offset++]; if (len < 4) { - log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "Too small reply"); + log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "%s", "Too small reply"); pnd->last_error = NFC_EIO; return pnd->last_error; } @@ -623,6 +624,7 @@ read: int acr122_usb_ack (nfc_device *pnd) { + (void) pnd; return 0; //return acr122_usb_bulk_write (DRIVER_DATA (pnd), (uint8_t *) pn53x_ack_frame, sizeof (pn53x_ack_frame), 1000); } diff --git a/utils/nfc-relay-picc.c b/utils/nfc-relay-picc.c index a2bd316..c3cadfa 100644 --- a/utils/nfc-relay-picc.c +++ b/utils/nfc-relay-picc.c @@ -74,6 +74,7 @@ FILE * fd4; static void intr_hdlr (int sig) { + (void) sig; printf ("\nQuitting...\n"); printf ("Please send a last command to the emulator to quit properly.\n"); quitting = true;