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
This commit is contained in:
Philippe Teuwen 2013-03-06 00:30:38 +01:00
parent 4822bb3e42
commit 3f5a3fd58f
2 changed files with 2 additions and 4 deletions

View file

@ -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);

View file

@ -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);