diff --git a/examples/bluetooth/ble_compatibility_test/main/ble_compatibility_test.c b/examples/bluetooth/ble_compatibility_test/main/ble_compatibility_test.c index d905a4532..fca661d2c 100644 --- a/examples/bluetooth/ble_compatibility_test/main/ble_compatibility_test.c +++ b/examples/bluetooth/ble_compatibility_test/main/ble_compatibility_test.c @@ -176,11 +176,8 @@ static const uint16_t primary_service_uuid = ESP_GATT_UUID_PRI_SERVICE; static const uint16_t character_declaration_uuid = ESP_GATT_UUID_CHAR_DECLARE; static const uint16_t character_client_config_uuid = ESP_GATT_UUID_CHAR_CLIENT_CONFIG; static const uint16_t character_user_description = ESP_GATT_UUID_CHAR_DESCRIPTION; -static const uint8_t char_prop_read = ESP_GATT_CHAR_PROP_BIT_READ; -static const uint8_t char_prop_write = ESP_GATT_CHAR_PROP_BIT_WRITE; static const uint8_t char_prop_notify = ESP_GATT_CHAR_PROP_BIT_NOTIFY; -static const uint8_t char_prop_read_write = ESP_GATT_CHAR_PROP_BIT_WRITE | ESP_GATT_CHAR_PROP_BIT_READ; -static const uint8_t char_prop_read_write_notify = ESP_GATT_CHAR_PROP_BIT_WRITE | ESP_GATT_CHAR_PROP_BIT_READ | ESP_GATT_CHAR_PROP_BIT_NOTIFY; +static const uint8_t char_prop_read_write = ESP_GATT_CHAR_PROP_BIT_WRITE | ESP_GATT_CHAR_PROP_BIT_READ; static const uint8_t char1_name[] = "Char_1_Short_WR"; static const uint8_t char2_name[] = "Char_2_Long_WR"; static const uint8_t char3_name[] = "Char_3_Short_Notify"; diff --git a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c index 192101297..eaa69d278 100644 --- a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c +++ b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser.c @@ -201,6 +201,7 @@ static void parse_gsv(esp_gps_t *esp_gps) switch (esp_gps->item_num) { case 1: /* total GSV numbers */ esp_gps->sat_count = (uint8_t)strtol(esp_gps->item_str, NULL, 10); + break; case 2: /* Current GSV statement number */ esp_gps->sat_num = (uint8_t)strtol(esp_gps->item_str, NULL, 10); break; diff --git a/examples/wifi/simple_sniffer/main/cmd_sniffer.c b/examples/wifi/simple_sniffer/main/cmd_sniffer.c index fb5aea630..fdf7572c9 100644 --- a/examples/wifi/simple_sniffer/main/cmd_sniffer.c +++ b/examples/wifi/simple_sniffer/main/cmd_sniffer.c @@ -43,9 +43,9 @@ typedef struct { static esp_err_t create_packet_file(void) { uint32_t file_no = 0; - char filename[PCAP_FILE_NAME_MAX_LEN]; + char filename[PCAP_FILE_NAME_MAX_LEN + 15]; do { - snprintf(filename, PCAP_FILE_NAME_MAX_LEN, "%s%d.pcap", packet_filepath, file_no); + snprintf(filename, sizeof(filename), "%s%d.pcap", packet_filepath, file_no); file_no++; } while (0 == access(filename, F_OK)); /* Create file to write, binary format */ diff --git a/tools/cmake/idf_functions.cmake b/tools/cmake/idf_functions.cmake index e8cd82832..0a3af7e03 100644 --- a/tools/cmake/idf_functions.cmake +++ b/tools/cmake/idf_functions.cmake @@ -76,10 +76,11 @@ endmacro() function(idf_set_global_compile_options) # Temporary trick to support both gcc5 and gcc8 builds if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2.0) - set(GCC_NOT_5_2_0 0) + set(GCC_NOT_5_2_0 0 CACHE STRING "GCC is 5.2.0 version") else() - set(GCC_NOT_5_2_0 1) + set(GCC_NOT_5_2_0 1 CACHE STRING "GCC is not 5.2.0 version") endif() + list(APPEND compile_definitions "GCC_NOT_5_2_0=${GCC_NOT_5_2_0}") list(APPEND compile_definitions "ESP_PLATFORM" "HAVE_CONFIG_H") @@ -178,9 +179,6 @@ function(idf_set_global_compile_options) list(APPEND cxx_compile_options ${EXTRA_CXXFLAGS}) list(APPEND compile_options ${EXTRA_CPPFLAGS}) - # Temporary trick to support both gcc5 and gcc8 builds - list(APPEND compile_definitions "GCC_NOT_5_2_0=${GCC_NOT_5_2_0}") - set_default(IDF_COMPILE_DEFINITIONS "${compile_definitions}") set_default(IDF_COMPILE_OPTIONS "${compile_options}") set_default(IDF_C_COMPILE_OPTIONS "${c_compile_options}")