Silent some warnings.

This commit is contained in:
rconty@il4p.fr
2011-04-01 09:17:40 +00:00
parent 929ed9dc3b
commit d6a9da4e4b
2 changed files with 7 additions and 4 deletions

View File

@@ -51,6 +51,8 @@ AC_CHECK_HEADERS([byteswap.h])
AC_CHECK_HEADERS([endian.h sys/endian.h CoreFoundation/CoreFoundation.h]) AC_CHECK_HEADERS([endian.h sys/endian.h CoreFoundation/CoreFoundation.h])
AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/time.h unistd.h]) AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/time.h unistd.h])
AC_DEFINE(_XOPEN_SOURCE, 600, [Enable POSIX extensions if present])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL AC_HEADER_STDBOOL
AC_TYPE_SIZE_T AC_TYPE_SIZE_T

View File

@@ -138,6 +138,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <err.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
@@ -1593,7 +1594,7 @@ int main(int argc, char* argv[])
if ( !mfcuk_key_arr_to_uint64( &(current_default_keys[j][0]), &crntVerifKey) ) if ( !mfcuk_key_arr_to_uint64( &(current_default_keys[j][0]), &crntVerifKey) )
{ {
WARN("mfcuk_key_arr_to_uint64() failed, verification key will be %012llx", crntVerifKey); WARN("mfcuk_key_arr_to_uint64() failed, verification key will be %012"PRIx64"", crntVerifKey);
} }
/* /*
@@ -1630,7 +1631,7 @@ int main(int argc, char* argv[])
} }
else else
{ {
ERR("AUTH sector %d, block %d, key %012llx, key-type 0x%02x, error code 0x%02x", i, block, crntVerifKey, k, uiErrCode); ERR("AUTH sector %d, block %d, key %012"PRIx64", key-type 0x%02x, error code 0x%02x", i, block, crntVerifKey, k, uiErrCode);
} }
// Reset advanced settings // Reset advanced settings
@@ -1646,7 +1647,7 @@ int main(int argc, char* argv[])
if ( !nfc_initiator_mifare_cmd(pnd, k, block, &mp) ) if ( !nfc_initiator_mifare_cmd(pnd, k, block, &mp) )
{ {
ERR("AUTH sector %d, block %d, key %012llx, key-type 0x%02x, error code 0x%02x", i, block, crntVerifKey, k, uiErrCode); ERR("AUTH sector %d, block %d, key %012"PRIx64", key-type 0x%02x, error code 0x%02x", i, block, crntVerifKey, k, uiErrCode);
} }
else else
{ {
@@ -1757,7 +1758,7 @@ int main(int argc, char* argv[])
if ( !mfcuk_key_uint64_to_arr( &ui64KeyRecovered, (j == keyA)?(&(ptr_trailer->abtKeyA[0])):(&(ptr_trailer->abtKeyB[0])) ) ) if ( !mfcuk_key_uint64_to_arr( &ui64KeyRecovered, (j == keyA)?(&(ptr_trailer->abtKeyA[0])):(&(ptr_trailer->abtKeyB[0])) ) )
{ {
WARN("mfcuk_key_uint64_to_arr() failed, recovered key should have been %012llx", ui64KeyRecovered); WARN("mfcuk_key_uint64_to_arr() failed, recovered key should have been %012"PRIx64"", ui64KeyRecovered);
} }
} }
} // for (j=keyA; j<=keyB; j++) } // for (j=keyA; j<=keyB; j++)