diff --git a/CMakeLists.txt b/CMakeLists.txt index 326aaab..f8448ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ PROJECT(libnfc C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(VERSION_MAJOR "1") -SET(VERSION_MINOR "2") -SET(VERSION_PATCH "1") +SET(VERSION_MINOR "3") +SET(VERSION_PATCH "0") SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") @@ -14,10 +14,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE # make it easy to locate CMake modules for finding libraries SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") -SET(LIBNFC_VERBOSE_OUTPUT OFF CACHE BOOL "Verbose output of communication with the NFC chip") -SET(LIBNFC_LANG_C99 OFF CACHE BOOL "Use C99 language standard (GCC only)") +SET(LIBNFC_DEBUG_OUTPUT OFF CACHE BOOL "Debug output of communication with the NFC chip") SET(LIBNFC_PCSC ON CACHE BOOL "Enable PC/SC support (ACR122)") -SET(LIBNFC_USB OFF CACHE BOOL "Enable direct USB communication support (PN531 and PN533)") +SET(LIBNFC_USB ON CACHE BOOL "Enable direct USB communication support (PN531 and PN533)") SET(LIBNFC_DISABLE_SERIAL_AUTOPROBE OFF CACHE BOOL "Disable serial autoprobe") IF(DEFINED CMAKE_INSTALL_LIBDIR) @@ -38,6 +37,12 @@ IF(NOT DEFINED SHARE_INSTALL_PREFIX) SET(SHARE_INSTALL_PREFIX share) ENDIF(NOT DEFINED SHARE_INSTALL_PREFIX) +IF(LIBNFC_DEBUG_OUTPUT) + ADD_DEFINITIONS(-DDEBUG -g3) +ENDIF(LIBNFC_DEBUG_OUTPUT) + +ADD_DEFINITIONS(-Wall -pedantic -std=c99) + IF(NOT MSVC) # Set some pkg-config variables SET(prefix ${CMAKE_INSTALL_PREFIX}) diff --git a/src/examples/nfc-emulate.c b/src/examples/nfc-emulate.c index b208784..28ab002 100644 --- a/src/examples/nfc-emulate.c +++ b/src/examples/nfc-emulate.c @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) print_usage(argv); return 0; } else if (0 == strcmp(argv[arg], "-q")) { - INFO("Quiet mode."); + INFO("%s", "Quiet mode."); quiet_output = true; } else if((arg == argc-1) && (strlen(argv[arg]) == 8)) { // See if UID was specified as HEX string byte_t abtTmp[3] = { 0x00,0x00,0x00 }; diff --git a/src/examples/nfc-relay.c b/src/examples/nfc-relay.c index 04b520b..5988689 100644 --- a/src/examples/nfc-relay.c +++ b/src/examples/nfc-relay.c @@ -70,7 +70,7 @@ int main(int argc,char* argv[]) print_usage(argv); return 0; } else if (0 == strcmp(argv[arg], "-q")) { - INFO("Quiet mode."); + INFO("%s", "Quiet mode."); quiet_output = true; } else { ERR("%s is not supported option.", argv[arg]); diff --git a/src/lib/drivers/acr122.c b/src/lib/drivers/acr122.c index f9f4e6b..8d9c81f 100644 --- a/src/lib/drivers/acr122.c +++ b/src/lib/drivers/acr122.c @@ -136,7 +136,6 @@ acr122_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *p size_t szDeviceNamesLen = sizeof(acDeviceNames); acr122_spec_t as; uint32_t uiBusIndex = 0; - char *pcFirmware; SCARDCONTEXT *pscc; // Clear the reader list