From 4420f7da4d8d691c3c0905ae5c7836b581399747 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Wed, 12 Jan 2022 18:29:03 -0800 Subject: [PATCH] remove warnings (except CSpot ones) --- components/platform_console/CMakeLists.txt | 6 ++++++ components/platform_console/platform_console.c | 4 ++-- components/squeezelite/CMakeLists.txt | 5 +++++ components/squeezelite/output_i2s.c | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/components/platform_console/CMakeLists.txt b/components/platform_console/CMakeLists.txt index 2c41c179..9c99d841 100644 --- a/components/platform_console/CMakeLists.txt +++ b/components/platform_console/CMakeLists.txt @@ -12,3 +12,9 @@ idf_component_register( SRCS target_link_libraries(${COMPONENT_LIB} "-Wl,--undefined=GDS_DrawPixelFast") target_link_libraries(${COMPONENT_LIB} ${build_dir}/esp-idf/$/lib$.a ) target_add_binary_data( __idf_platform_console presets.json BINARY) + +set_source_files_properties(cmd_config.c + PROPERTIES COMPILE_FLAGS + -Wno-unused-function +) + diff --git a/components/platform_console/platform_console.c b/components/platform_console/platform_console.c index a0d1f506..11104a0a 100644 --- a/components/platform_console/platform_console.c +++ b/components/platform_console/platform_console.c @@ -283,9 +283,9 @@ static int stdin_dummy(const char * path, int flags, int mode) { return 0; } void initialize_console() { /* Minicom, screen, idf_monitor send CR when ENTER key is pressed (unused if we redirect stdin) */ - esp_vfs_dev_uart_set_rx_line_endings(ESP_LINE_ENDINGS_CR); + esp_vfs_dev_uart_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR); /* Move the caret to the beginning of the next line on '\n' */ - esp_vfs_dev_uart_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF); + esp_vfs_dev_uart_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF); /* Configure UART. Note that REF_TICK is used so that the baud rate remains * correct while APB frequency is changing in light sleep mode. diff --git a/components/squeezelite/CMakeLists.txt b/components/squeezelite/CMakeLists.txt index d7422b48..5c1f0375 100644 --- a/components/squeezelite/CMakeLists.txt +++ b/components/squeezelite/CMakeLists.txt @@ -21,6 +21,11 @@ set_source_files_properties(mad.c pcm.c flac.c alac.c helix-aac.c vorbis.c opus. -Wno-maybe-uninitialized ) +set_source_files_properties(wm8978/wm8978.c + PROPERTIES COMPILE_FLAGS + -Wno-unused-function +) + add_definitions(-DLINKALL -DLOOPBACK -DNO_FAAD -DEMBEDDED -DTREMOR_ONLY -DCUSTOM_VERSION=${BUILD_NUMBER}) if (${DEPTH} EQUAL "32") diff --git a/components/squeezelite/output_i2s.c b/components/squeezelite/output_i2s.c index af77cd4a..76ce69cb 100644 --- a/components/squeezelite/output_i2s.c +++ b/components/squeezelite/output_i2s.c @@ -247,7 +247,7 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch // common I2S initialization i2s_config.mode = I2S_MODE_MASTER | I2S_MODE_TX; i2s_config.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT; - i2s_config.communication_format = I2S_COMM_FORMAT_I2S| I2S_COMM_FORMAT_I2S_MSB; + i2s_config.communication_format = I2S_COMM_FORMAT_STAND_I2S; // in case of overflow, do not replay old buffer i2s_config.tx_desc_auto_clear = true; i2s_config.use_apll = true;