From 7bb9d33e2c2dccd700db53468d58e7b6f5b796c6 Mon Sep 17 00:00:00 2001 From: "roel@libnfc.org" Date: Wed, 25 Sep 2013 10:40:16 +0000 Subject: [PATCH] fixed warnings on Mac OS 10.8, xcode 5 --- client/cmddata.c | 2 +- client/cmdhf14b.c | 2 +- client/cmdhf15.c | 16 ++++++++-------- client/cmdhw.c | 2 +- client/cmdlfem4x.c | 2 +- common/iso15693tools.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/cmddata.c b/client/cmddata.c index 7eec667d..265b0ed7 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -812,7 +812,7 @@ int CmdThreshold(const char *Cmd) if (GraphBuffer[i] >= threshold) GraphBuffer[i] = 1; else - GraphBuffer[i] =- 1; + GraphBuffer[i] = -1; } RepaintGraphWindow(); return 0; diff --git a/client/cmdhf14b.c b/client/cmdhf14b.c index 7694c2cd..5317994f 100644 --- a/client/cmdhf14b.c +++ b/client/cmdhf14b.c @@ -359,7 +359,7 @@ int CmdHF14BCmdRaw (const char *cmd) { if (hexout != NULL) { uint8_t first, second; for (int i = 0; i < resp.arg[0]; 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/cmdhf15.c b/client/cmdhf15.c index ec898755..cbc0ae12 100644 --- a/client/cmdhf15.c +++ b/client/cmdhf15.c @@ -328,7 +328,7 @@ int CmdHF15DumpMem(const char*Cmd) { *output=0; // reset outputstring sprintf(output, "Block %2i ",blocknum); for ( int i=1; i 255) { + if (c.arg[0] < 19 || c.arg[0] > 255) { PrintAndLog("divisor must be between 19 and 255"); } else { SendCommand(&c); diff --git a/client/cmdlfem4x.c b/client/cmdlfem4x.c index 125d8ab9..bd6137ac 100644 --- a/client/cmdlfem4x.c +++ b/client/cmdlfem4x.c @@ -412,7 +412,7 @@ int CmdEM4x50Read(const char *Cmd) int CmdEM410xWrite(const char *Cmd) { uint64_t id = 0xFFFFFFFFFFFFFFFF; // invalid id value - unsigned int card = 0xFF; // invalid card value + int card = 0xFF; // invalid card value unsigned int clock = 0; // invalid clock value sscanf(Cmd, "%" PRIx64 " %d %d", &id, &card, &clock); diff --git a/common/iso15693tools.c b/common/iso15693tools.c index ec9c4a5e..add0ba69 100644 --- a/common/iso15693tools.c +++ b/common/iso15693tools.c @@ -58,7 +58,7 @@ int sprintf(char *str, const char *format, ...); char* Iso15693sprintUID(char *target,uint8_t *uid) { static char tempbuf[2*8+1]=""; if (target==NULL) target=tempbuf; - sprintf(target,"%02hX%02hX%02hX%02hX%02hX%02hX%02hX%02hX", + sprintf(target,"%02X%02X%02X%02X%02X%02X%02X%02X", uid[7],uid[6],uid[5],uid[4],uid[3],uid[2],uid[1],uid[0]); return target; } -- 2.39.5