Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile with very verbose logger #38

Open
iBobik opened this issue Jul 3, 2024 · 0 comments
Open

Cannot compile with very verbose logger #38

iBobik opened this issue Jul 3, 2024 · 0 comments

Comments

@iBobik
Copy link

iBobik commented Jul 3, 2024

Hi, when I compiled it with ESPHome 2024.6.4 for ESP32S3:

esphome:
  name: $id_name
  friendly_name: $human_name
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: esp-idf

logger:
  level: VERY_VERBOSE

…

Compile failed:

Compiling .pioenvs/cooling/src/esphome/components/truma_inetbox/TrumaiNetBoxAppConfig.o
In file included from src/esphome/components/truma_inetbox/LinBusLog.h:3,
                 from src/esphome/components/truma_inetbox/LinBusListener.h:3,
                 from src/esphome/components/truma_inetbox/LinBusListener.cpp:1:
src/esphome/components/truma_inetbox/LinBusListener.cpp: In member function 'void esphome::truma_inetbox::LinBusListener::process_log_queue(TickType_t)':
src/esphome/components/truma_inetbox/LinBusListener.cpp:396:25: error: format '%S' expects argument of type 'wchar_t*', but argument 8 has type 'const char*' [-Werror=format=]
           ESP_LOGV(TAG, "PID %02X      %s %s %S", current_PID_, format_hex_pretty(log_msg.data, log_msg.len).c_str(),
                         ^~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:72:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
 #define ESPHOME_LOG_FORMAT(format) format
                                    ^~~~~~
src/esphome/core/log.h:154:28: note: in expansion of macro 'esph_log_v'
 #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
                            ^~~~~~~~~~
src/esphome/components/truma_inetbox/LinBusListener.cpp:396:11: note: in expansion of macro 'ESP_LOGV'
           ESP_LOGV(TAG, "PID %02X      %s %s %S", current_PID_, format_hex_pretty(log_msg.data, log_msg.len).c_str(),
           ^~~~~~~~
cc1plus: some warnings being treated as errors
*** [.pioenvs/cooling/src/esphome/components/truma_inetbox/LinBusListener.o] Error 1

When removed logger level (so to default DEBUG level) there are only this warnings:

In file included from src/esphome.h:84,
                 from src/main.cpp:3:
src/esphome/components/truma_inetbox/sensor/TrumaSensor.h:23:20: warning: 'const char* esphome::truma_inetbox::enum_to_c_str(esphome::truma_inetbox::TRUMA_SENSOR_TYPE)' defined but not used [-Wunused-function]
 static const char *enum_to_c_str(const TRUMA_SENSOR_TYPE val) {
                    ^~~~~~~~~~~~~
In file included from src/esphome/components/truma_inetbox/select/TrumaHeaterSelect.h:3,
                 from src/esphome.h:82,
                 from src/main.cpp:3:
src/esphome/components/truma_inetbox/select/enum.h:33:20: warning: 'const char* esphome::truma_inetbox::enum_to_c_str(esphome::truma_inetbox::TRUMA_SELECT_TYPE)' defined but not used [-Wunused-function]
 static const char *enum_to_c_str(const TRUMA_SELECT_TYPE val) {
                    ^~~~~~~~~~~~~
In file included from src/esphome/components/truma_inetbox/number/TrumaAirconManualNumber.h:3,
                 from src/esphome.h:79,
                 from src/main.cpp:3:
src/esphome/components/truma_inetbox/number/enum.h:19:20: warning: 'const char* esphome::truma_inetbox::enum_to_c_str(esphome::truma_inetbox::TRUMA_NUMBER_TYPE)' defined but not used [-Wunused-function]
 static const char *enum_to_c_str(const TRUMA_NUMBER_TYPE val) {
                    ^~~~~~~~~~~~~
In file included from src/esphome/components/truma_inetbox/binary_sensor/TrumaHeaterBinarySensor.h:5,
                 from src/esphome.h:73,
                 from src/main.cpp:3:
src/esphome/components/truma_inetbox/binary_sensor/enum.h:26:20: warning: 'const char* esphome::truma_inetbox::enum_to_c_str(esphome::truma_inetbox::TRUMA_BINARY_SENSOR_TYPE)' defined but not used [-Wunused-function]
 static const char *enum_to_c_str(const TRUMA_BINARY_SENSOR_TYPE val) {
                    ^~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant