]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
fixed warnings on Mac OS 10.8, xcode 5
authorroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 25 Sep 2013 10:40:16 +0000 (10:40 +0000)
committerroel@libnfc.org <roel@libnfc.org@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Wed, 25 Sep 2013 10:40:16 +0000 (10:40 +0000)
client/cmddata.c
client/cmdhf14b.c
client/cmdhf15.c
client/cmdhw.c
client/cmdlfem4x.c
common/iso15693tools.c

index 7eec667d301673bc656da2fd5b21c02538e6a4b7..265b0ed740414696b531a5fcec76044c45c39865 100644 (file)
@@ -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;
index 7694c2cd3a7399898db88278a3c8174b9ef42bec..5317994fcb48fdded09d06b9fbcfcfc82b943477 100644 (file)
@@ -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);
index ec8987559b94ee3377e4babf8be988ff7f2adfed..cbc0ae128b4cc5f8176f522413eaaa614387b389 100644 (file)
@@ -328,7 +328,7 @@ int CmdHF15DumpMem(const char*Cmd) {
                                        *output=0; // reset outputstring
                                        sprintf(output, "Block %2i   ",blocknum);
                                        for ( int i=1; i<resp.arg[0]-2; i++) { // data in hex
-                                               sprintf(output+strlen(output),"%02hX ",recv[i]);                                        
+                                               sprintf(output+strlen(output),"%02X ",recv[i]);
                                        }                                       
                                        strcat(output,"   "); 
                                        for ( int i=1; i<resp.arg[0]-2; i++) { // data in cleaned ascii
@@ -516,7 +516,7 @@ int CmdHF15CmdRaw (const char *cmd) {
                        hexout = (char *)malloc(resp.arg[0] * 3 + 1);
                        if (hexout != NULL) {
                                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);
@@ -669,7 +669,7 @@ int CmdHF15CmdSysinfo(const char *Cmd) {
                        if (!(recv[0] & ISO15_RES_ERROR)) {
                                *output=0; // reset outputstring
                                for ( i=1; i<resp.arg[0]-2; i++) {
-                                       sprintf(output+strlen(output),"%02hX ",recv[i]);                                        
+                                       sprintf(output+strlen(output),"%02X ",recv[i]);
                                }                                       
                                strcat(output,"\n\r");
                                strcat(output,"UID = ");
@@ -679,11 +679,11 @@ int CmdHF15CmdSysinfo(const char *Cmd) {
                                strcat(output,"\n\r");
                                i=10;
                                if (recv[1] & 0x01) 
-                                       sprintf(output+strlen(output),"DSFID supported, set to %02hX\n\r",recv[i++]);
+                                       sprintf(output+strlen(output),"DSFID supported, set to %02X\n\r",recv[i++]);
                                else 
                                        strcat(output,"DSFID not supported\n\r");
                                if (recv[1] & 0x02) 
-                                       sprintf(output+strlen(output),"AFI supported, set to %03hX\n\r",recv[i++]);
+                                       sprintf(output+strlen(output),"AFI supported, set to %03X\n\r",recv[i++]);
                                else 
                                        strcat(output,"AFI not supported\n\r");
                                if (recv[1] & 0x04) {
@@ -693,7 +693,7 @@ int CmdHF15CmdSysinfo(const char *Cmd) {
                                        i+=2;
                                } else 
                                        strcat(output,"Tag does not provide information on memory layout\n\r");
-                               if (recv[1] & 0x08) sprintf(output+strlen(output),"IC reference given: %02hX\n\r",recv[i++]);
+                               if (recv[1] & 0x08) sprintf(output+strlen(output),"IC reference given: %02X\n\r",recv[i++]);
                                        else strcat(output,"IC reference not given\n\r");
 
 
@@ -770,7 +770,7 @@ int CmdHF15CmdReadmulti(const char *Cmd) {
                        if (!(recv[0] & ISO15_RES_ERROR)) {
                                *output=0; // reset outputstring
                                for ( int i=1; i<resp.arg[0]-2; i++) {
-                                       sprintf(output+strlen(output),"%02hX ",recv[i]);                                        
+                                       sprintf(output+strlen(output),"%02X ",recv[i]);
                                }                                       
                                strcat(output,"   ");
                                for ( int i=1; i<resp.arg[0]-2; i++) {
@@ -844,7 +844,7 @@ int CmdHF15CmdRead(const char *Cmd) {
                                *output=0; // reset outputstring
                                //sprintf(output, "Block %2i   ",blocknum);
                                for ( int i=1; i<resp.arg[0]-2; i++) {
-                                       sprintf(output+strlen(output),"%02hX ",recv[i]);                                        
+                                       sprintf(output+strlen(output),"%02X ",recv[i]);
                                }                                       
                                strcat(output,"   ");
                                for ( int i=1; i<resp.arg[0]-2; i++) {
index cdeb48b82914642fb8ec6384d05183c8c70169ec..dd1f37b3c5be343f20ad86d1e006c1c91e590143 100644 (file)
@@ -87,7 +87,7 @@ int CmdReset(const char *Cmd)
 int CmdSetDivisor(const char *Cmd)
 {
   UsbCommand c = {CMD_SET_LF_DIVISOR, {strtol(Cmd, NULL, 0), 0, 0}};
-  if (c.arg[0] < 0 || c.arg[0] > 255) {
+  if (c.arg[0] < 19 || c.arg[0] > 255) {
     PrintAndLog("divisor must be between 19 and 255");
   } else {
     SendCommand(&c);
index 125d8ab926873f981e787360e61362b159b091f3..bd6137ac49eb0b4d6d0e2d34d7c016418ffb9e29 100644 (file)
@@ -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);
index ec9c4a5e50d7eb92f8af9ca1d1f47d0ecd64c17f..add0ba69f8367b4d7ede2b5863014d156d3d5251 100644 (file)
@@ -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;
 }
Impressum, Datenschutz