diff --git a/UNITTESTS/CMakeLists.txt b/UNITTESTS/CMakeLists.txt index 95806c5..4116426 100644 --- a/UNITTESTS/CMakeLists.txt +++ b/UNITTESTS/CMakeLists.txt @@ -9,10 +9,10 @@ macro(use_cxx14) if (CMAKE_VERSION VERSION_LESS 3.1) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14") endif() else() - set(CMAKE_CXX_STANDARD 98) + set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() endmacro() diff --git a/UNITTESTS/stubs/ATHandler_stub.cpp b/UNITTESTS/stubs/ATHandler_stub.cpp index 8f4038f..b69fe50 100644 --- a/UNITTESTS/stubs/ATHandler_stub.cpp +++ b/UNITTESTS/stubs/ATHandler_stub.cpp @@ -55,7 +55,7 @@ bool ATHandler_stub::process_oob_urc = false; int ATHandler_stub::read_string_index = kRead_string_table_size; -const char *ATHandler_stub::read_string_table[kRead_string_table_size] = {'\0'}; +const char *ATHandler_stub::read_string_table[kRead_string_table_size]; int ATHandler_stub::resp_stop_success_count = kResp_stop_count_default; bool ATHandler_stub::get_debug_flag = false; diff --git a/features/cellular/framework/AT/AT_CellularSMS.cpp b/features/cellular/framework/AT/AT_CellularSMS.cpp index dd30b4d..aae8ab5 100644 --- a/features/cellular/framework/AT/AT_CellularSMS.cpp +++ b/features/cellular/framework/AT/AT_CellularSMS.cpp @@ -41,7 +41,7 @@ #define NVAM '?' // Not Valid ascii, ISO-8859-1 mark // mapping table from 7-bit GSM to ascii (ISO-8859-1) -static const char gsm_to_ascii[] = { +static const unsigned char gsm_to_ascii[] = { 64, // 0 163, // 1 36, // 2 @@ -1153,7 +1153,7 @@ char *gsm_str = new char[len]; for (uint16_t y = 0; y < len; y++) { for (int x = 0; x < GSM_TO_ASCII_TABLE_SIZE; x++) { - if (gsm_to_ascii[x] == str[y]) { + if (gsm_to_ascii[x] == static_cast(str[y])) { gsm_str[y] = x; } }