From 3f5a3fd58ff9ef2e477a3c3203ac882fb3a4518a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 6 Mar 2013 00:30:38 +0100 Subject: [PATCH] nfc-read-forum-tag3 & nfc-relay-picc: remove unused variable Fix cppcheck warnings [utils/nfc-read-forum-tag3.c:281]: (style) Variable 'len' is assigned a value that is never used [utils/nfc-relay-picc.c:392]: (style) Variable 'res' is assigned a value that is never used --- utils/nfc-read-forum-tag3.c | 3 +-- utils/nfc-relay-picc.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/nfc-read-forum-tag3.c b/utils/nfc-read-forum-tag3.c index df4a543..7b60f8d 100644 --- a/utils/nfc-read-forum-tag3.c +++ b/utils/nfc-read-forum-tag3.c @@ -278,9 +278,8 @@ main(int argc, char *argv[]) uint8_t data[1024]; size_t data_len = sizeof(data); - int len; - if (0 >= (len = nfc_forum_tag_type3_check(pnd, nt, 0, 1, data, &data_len))) { + if (nfc_forum_tag_type3_check(pnd, nt, 0, 1, data, &data_len) <= 0) { nfc_perror(pnd, "nfc_forum_tag_type3_check"); fclose(ndef_stream); nfc_close(pnd); diff --git a/utils/nfc-relay-picc.c b/utils/nfc-relay-picc.c index 90221c8..1659c4d 100644 --- a/utils/nfc-relay-picc.c +++ b/utils/nfc-relay-picc.c @@ -389,8 +389,7 @@ main(int argc, char *argv[]) } printf("NFC emulator device: %s opened\n", nfc_device_get_name(pndTarget)); - int res; - if ((res = nfc_target_init(pndTarget, &ntEmulatedTarget, abtCapdu, sizeof(abtCapdu), 0)) < 0) { + if (nfc_target_init(pndTarget, &ntEmulatedTarget, abtCapdu, sizeof(abtCapdu), 0) < 0) { ERR("%s", "Initialization of NFC emulator failed"); if (!target_only_mode) { nfc_close(pndInitiator);