From f66021cf4875fed1ae5b6767f61197d3896e224e Mon Sep 17 00:00:00 2001 From: "roel@libnfc.org" Date: Thu, 3 Oct 2013 14:36:42 +0000 Subject: [PATCH] fixed compiler warnings --- client/cmdhf14a.c | 3 +-- client/cmdlf.c | 2 +- client/nonce2key/nonce2key.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index 9309a1a9..f7e0ffa9 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -596,9 +596,8 @@ static void waitCmd(uint8_t iSelect) return; hexout = (char *)malloc(iLen * 3 + 1); if (hexout != NULL) { - uint8_t first, second; for (int i = 0; i < iLen; i++) { // data in hex - sprintf(&hexout[i * 3], "%02hX ", recv[i]); + sprintf(&hexout[i * 3], "%02X ", recv[i]); } PrintAndLog("%s", hexout); free(hexout); diff --git a/client/cmdlf.c b/client/cmdlf.c index 6511ba13..c278fb3d 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -362,7 +362,7 @@ int CmdLFRead(const char *Cmd) c.arg[0] = 1; } else if (*Cmd == '\0') { c.arg[0] = 0; - } else if (sscanf(Cmd, "%i", &c.arg[0]) != 1) { + } else if (sscanf(Cmd, "%"lli, &c.arg[0]) != 1) { PrintAndLog("use 'read' or 'read h', or 'read '"); return 0; } diff --git a/client/nonce2key/nonce2key.c b/client/nonce2key/nonce2key.c index 7c63722d..47206380 100644 --- a/client/nonce2key/nonce2key.c +++ b/client/nonce2key/nonce2key.c @@ -105,7 +105,7 @@ int nonce2key(uint32_t uid, uint32_t nt, uint32_t nr, uint64_t par_info, uint64_ p2 = state_s; while ( *p1 != -1 && *p2 != -1 ) { if (compar_state(p1, p2) == 0) { - printf("p1:%d p2:%d p3:%d key:%012llx\n",p1-last_keylist, p2-state_s, p3-last_keylist,*p1); + printf("p1:%ld p2:%ld p3:%ld key:%012"llx"\n",p1-last_keylist, p2-state_s, p3-last_keylist,*p1); *p3++ = *p1++; p2++; } -- 2.39.5