squash a bunch of warnings

custom
jacqueline 1 year ago
parent 354ba0325a
commit 8e113ea9ae
  1. 2
      lib/libcppbor/CMakeLists.txt
  2. 1
      lib/libmad/CMakeLists.txt
  3. 1
      lib/luavgl/CMakeLists.txt
  4. 1
      lib/lvgl/env_support/cmake/esp.cmake
  5. 2
      lib/opus/CMakeLists.txt
  6. 2
      lib/speexdsp/CMakeLists.txt
  7. 2
      lib/tremor/CMakeLists.txt
  8. 2
      src/database/track.cpp
  9. 2
      src/drivers/adc.cpp
  10. 3
      src/drivers/bluetooth.cpp
  11. 10
      tools/cmake/common.cmake

@ -5,3 +5,5 @@ idf_component_register(
SRCS cppbor.cpp cppbor_parse.cpp SRCS cppbor.cpp cppbor_parse.cpp
INCLUDE_DIRS "include/cppbor" INCLUDE_DIRS "include/cppbor"
) )
target_compile_options(${COMPONENT_LIB} PRIVATE
"-Wno-shadow" "-Wno-deprecated-enum-enum-conversion")

@ -41,6 +41,7 @@ target_compile_options(${COMPONENT_LIB}
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-implicit-function-declaration> $<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-implicit-function-declaration>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-stringop-overflow> $<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-stringop-overflow>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-fPIC> $<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-fPIC>
-Wno-implicit-fallthrough
-Ofast -Ofast
) )

@ -2,4 +2,5 @@
# #
# SPDX-License-Identifier: GPL-3.0-only # SPDX-License-Identifier: GPL-3.0-only
idf_component_register(SRCS "src/luavgl.c" INCLUDE_DIRS "src" REQUIRES "esp-idf-lua" "lvgl") idf_component_register(SRCS "src/luavgl.c" INCLUDE_DIRS "src" REQUIRES "esp-idf-lua" "lvgl")
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-cast-function-type" "-Wno-type-limits")

@ -31,6 +31,7 @@ else()
REQUIRES esp_timer) REQUIRES esp_timer)
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE") target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-missing-field-initializers" "-Wno-incompatible-pointer-types")
if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM) if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM)
target_compile_definitions(${COMPONENT_LIB} target_compile_definitions(${COMPONENT_LIB}

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.5)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(OpusPackageVersion) include(OpusPackageVersion)

@ -10,4 +10,4 @@ libspeexdsp/scal.c libspeexdsp/smallft.c
PRIV_INCLUDE_DIRS "libspeexdsp" PRIV_INCLUDE_DIRS "libspeexdsp"
) )
target_compile_options(${COMPONENT_LIB} PRIVATE -DHAVE_CONFIG_H -Wno-shift-negative-value -Wno-unused-const-variable) target_compile_options(${COMPONENT_LIB} PRIVATE -DHAVE_CONFIG_H -Wno-shift-negative-value -Wno-unused-const-variable -Wno-incompatible-pointer-types -Wno-unused-function -Wno-unused-variable)

@ -5,4 +5,4 @@ idf_component_register(
SRCS bitwise.c codebook.c dsp.c floor0.c floor1.c floor_lookup.c framing.c SRCS bitwise.c codebook.c dsp.c floor0.c floor1.c floor_lookup.c framing.c
info.c mapping0.c mdct.c misc.c res012.c vorbisfile.c info.c mapping0.c mdct.c misc.c res012.c vorbisfile.c
INCLUDE_DIRS ".") INCLUDE_DIRS ".")
target_compile_options("${COMPONENT_LIB}" PRIVATE -Ofast -Wno-error=misleading-indentation -Wno-error=maybe-uninitialized -Wno-error=char-subscripts -Wno-error=unused-label) target_compile_options("${COMPONENT_LIB}" PRIVATE -Ofast -Wno-misleading-indentation -Wno-maybe-uninitialized -Wno-char-subscripts -Wno-unused-label -Wno-shift-negative-value -Wno-unused-variable -Wno-type-limits -Wno-implicit-fallthrough)

@ -234,7 +234,7 @@ auto TrackTags::genres(const std::string_view s) -> void {
std::string src = {s.data(), s.size()}; std::string src = {s.data(), s.size()};
char* token = std::strtok(src.data(), kGenreDelimiters); char* token = std::strtok(src.data(), kGenreDelimiters);
auto trim_and_add = [=](std::string_view s) { auto trim_and_add = [this](std::string_view s) {
std::string copy = {s.data(), s.size()}; std::string copy = {s.data(), s.size()};
// Trim the left // Trim the left

@ -18,7 +18,7 @@ static const adc_bitwidth_t kAdcBitWidth = ADC_BITWIDTH_12;
static const adc_unit_t kAdcUnit = ADC_UNIT_1; static const adc_unit_t kAdcUnit = ADC_UNIT_1;
// Max battery voltage should be a little over 2V due to our divider, so we need // Max battery voltage should be a little over 2V due to our divider, so we need
// the max attenuation to properly handle the full range. // the max attenuation to properly handle the full range.
static const adc_atten_t kAdcAttenuation = ADC_ATTEN_DB_11; static const adc_atten_t kAdcAttenuation = ADC_ATTEN_DB_12;
// Corresponds to SENSOR_VP. // Corresponds to SENSOR_VP.
static const adc_channel_t kAdcChannel = ADC_CHANNEL_0; static const adc_channel_t kAdcChannel = ADC_CHANNEL_0;

@ -438,7 +438,8 @@ void Disabled::react(const events::Enable&) {
return; return;
} }
if ((err = esp_bluedroid_init() != ESP_OK)) { esp_bluedroid_config_t cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT();
if ((err = esp_bluedroid_init_with_cfg(&cfg) != ESP_OK)) {
ESP_LOGE(kTag, "initialize bluedroid failed %s", esp_err_to_name(err)); ESP_LOGE(kTag, "initialize bluedroid failed %s", esp_err_to_name(err));
return; return;
} }

@ -43,11 +43,11 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# Additional warnings used when compiling our components. # Additional warnings used when compiling our components.
# Unable to be used due to issues in ESP-IDF includes are: -Wpedantic # Unable to be used due to issues in ESP-IDF includes are: -Wpedantic
# -Wuseless-cast -Wconversion -Wold-style-cast -Wsign-conversion -Wcast-align # -Wuseless-cast -Wconversion -Wold-style-cast -Wsign-conversion -Wcast-align
set(EXTRA_WARNINGS "-Wshadow" "-Wnon-virtual-dtor" "-Wunused" set(EXTRA_WARNINGS "-Wnon-virtual-dtor" "-Wunused" "-Woverloaded-virtual"
"-Woverloaded-virtual" "-Wmisleading-indentation" "-Wduplicated-cond" "-Wmisleading-indentation" "-Wduplicated-cond" "-Wduplicated-branches"
"-Wduplicated-branches" "-Wlogical-op" "-Wnull-dereference" "-Wlogical-op" "-Wnull-dereference" "-Wdouble-promotion" "-Wformat=2"
"-Wdouble-promotion" "-Wformat=2" "-Wimplicit-fallthrough" "-Wimplicit-fallthrough" "-Wno-deprecated-enum-enum-conversion"
"-Wno-deprecated-enum-enum-conversion" "-Wno-array-bounds") "-Wno-array-bounds" "-Wno-missing-field-initializers")
# Extra build flags that should apply to the entire build. This should mostly # Extra build flags that should apply to the entire build. This should mostly
# just be used to setting flags that our external dependencies requires. # just be used to setting flags that our external dependencies requires.

Loading…
Cancel
Save