expansion character (code 0x8 at [row,col,system-id]: [3210,96,"file:/conf/hive-site.xml"]

本文详细解析了在启动Hive时遇到的expansion character(code0x8)异常问题,指出异常源于hive-site.xml文件第3210行的非法字符实体,并提供了修改描述或直接删除描述标签的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

启动hive的时候报expansion character (code 0x8 at [row,col,system-id]: [3210,96,"file:/home/hadoop/apache-hive-3.1.1-bin/conf/hive-site.xml"]

	Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8
 at [row,col,system-id]: [3210,96,"file:/home/hadoop/apache-hive-3.1.1-bin/conf/hive-site.xml"]
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2981)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2930)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2805)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:1459)
	at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:4990)
	at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:5063)
	at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5150)
	at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:5093)
	at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97)
	at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:81)
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:699)
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
Caused by: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8
 at [row,col,system-id]: [3210,96,"file:/home/hadoop/apache-hive-3.1.1-bin/conf/hive-site.xml"]
	at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:621)
	at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:491)
	at com.ctc.wstx.sr.StreamScanner.reportIllegalChar(StreamScanner.java:2456)
	at com.ctc.wstx.sr.StreamScanner.validateChar(StreamScanner.java:2403)
	at com.ctc.wstx.sr.StreamScanner.resolveCharEnt(StreamScanner.java:2369)
	at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1515)
	at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2828)
	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1123)
	at org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3277)
	at org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3071)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2964)
	... 17 more
原因

hive-site.xml 文件中3210行有错误字符,把描述改一下就好了,或者直接删除描述<description></description>。

转载于:https://my.oschina.net/lwenhao/blog/3010405

Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'useSSL' at [row,col,system-id]: [8,92,"file:/opt/en/apache-hive-3.1.3-bin/conf/hive-site.xml"] at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3024) at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2973) at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2848) at org.apache.hadoop.conf.Configuration.get(Configuration.java:1460) at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:4999) at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:5072) at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5159) at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:5107) at org.apache.hive.beeline.HiveSchemaTool.<init>(HiveSchemaTool.java:96) at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1473) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:318) at org.apache.hadoop.util.RunJar.main(RunJar.java:232) Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'useSSL' at [row,col,system-id]: [8,92,"file:/opt/en/apache-hive-3.1.3-bin/conf/hive-site.xml"] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:653) at com.ctc.wstx.sr.StreamScanner.parseEntityName(StreamScanner.java:2067) at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1525) at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2828) at com.ctc.wstx.sr.BasicStream
03-13
.4.1/esp-idf/components/fatfs/src -IE:/espidf/v5.4.1/esp-idf/components/fatfs/vfs -IE:/espidf/v5.4.1/esp-idf/components/idf_test/include -IE:/espidf/v5.4.1/esp-idf/components/idf_test/include/esp32c3 -IE:/espidf/v5.4.1/esp-idf/components/ieee802154/include -IE:/espidf/v5.4.1/esp-idf/components/json/cJSON -IE:/espidf/v5.4.1/esp-idf/components/mqtt/esp-mqtt/include -IE:/espidf/v5.4.1/esp-idf/components/nvs_sec_provider/include -IE:/espidf/v5.4.1/esp-idf/components/rt/include -IE:/espidf/v5.4.1/esp-idf/components/spiffs/include -IE:/espidf/v5.4.1/esp-idf/components/wifi_provisioning/include -march=rv32imc_zicsr_zifencei -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-error=extra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -nostartfiles -Os -freorder-blocks -fmacro-prefix-map=D:/esp32_C3/internal_communication_client_0.1=. -fmacro-prefix-map=E:/espidf/v5.4.1/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/mesh_broadcast.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\mesh_broadcast.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/mesh_broadcast.c.obj -c D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c In file included from D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:2: D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c: In function 'handle_broadcast_message': D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:52: error: 'src_addr' undeclared (first use in this function) 141 | ESP_LOGI(TAG, "閰嶇疆鏇存柊鏉ヨ嚜 %s: %.*s", src_addr, len, message); | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:137: note: in definition of macro 'ESP_LOG_LEVEL' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:114:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 114 | #define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:13: note: in expansion of macro 'ESP_LOGI' 141 | ESP_LOGI(TAG, "閰嶇疆鏇存柊鏉ヨ嚜 %s: %.*s", src_addr, len, message); | ^~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:52: note: each undeclared identifier is reported only once for each function it appears in 141 | ESP_LOGI(TAG, "閰嶇疆鏇存柊鏉ヨ嚜 %s: %.*s", src_addr, len, message); | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:137: note: in definition of macro 'ESP_LOG_LEVEL' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:114:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 114 | #define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:13: note: in expansion of macro 'ESP_LOGI' 141 | ESP_LOGI(TAG, "閰嶇疆鏇存柊鏉ヨ嚜 %s: %.*s", src_addr, len, message); | ^~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:62: error: 'len' undeclared (first use in this function) 141 | ESP_LOGI(TAG, "閰嶇疆鏇存柊鏉ヨ嚜 %s: %.*s", src_addr, len, message); | ^~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:137: note: in definition of macro 'ESP_LOG_LEVEL' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:114:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 114 | #define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:13: note: in expansion of macro 'ESP_LOGI' 141 | ESP_LOGI(TAG, "閰嶇疆鏇存柊鏉ヨ嚜 %s: %.*s", src_addr, len, message); | ^~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:142:13: error: implicit declaration of function 'update_configuration' [-Wimplicit-function-declaration] 142 | update_configuration(message); | ^~~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:147:22: error: 'msg_type' undeclared (first use in this function) 147 | msg_type, src_addr, len, message); | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:137: note: in definition of macro 'ESP_LOG_LEVEL' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW(TAG, "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 %s: %.*s", | ^~~~~~~~ ninja: build stopped: subcommand failed. * 终端进程“e:\espidf\espressif\tools\ninja\1.12.1\ninja.EXE”已终止,退出代码: 1。 * 正在执行任务: e:\espidf\espressif\tools\ninja\1.12.1\ninja.EXE [1/9] Performing build step for 'bootloader' [1/1] C:\Windows\system32\cmd.exe /C "cd /D D:\esp32_C3\internal_communication_client_0.1\build\bootloader\esp-idf\esptool_py && e:\espidf\espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe E:/espidf/v5.4.1/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 D:/esp32_C3/internal_communication_client_0.1/build/bootloader/bootloader.bin" Bootloader binary size 0x5160 bytes. 0x2ea0 bytes (36%) free. [4/9] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/mesh_broadcast.c.obj FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/mesh_broadcast.c.obj ccache E:\espidf\espressif\tools\riscv32-esp-elf\esp-14.2.0_20241119\riscv32-esp-elf\bin\riscv32-esp-elf-gcc.exe -DESP_PLATFORM -DIDF_VER=\"v5.4.1\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -DUNITY_INCLUDE_CONFIG_H -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -ID:/esp32_C3/internal_communication_client_0.1/build/config -ID:/esp32_C3/internal_communication_client_0.1/main -ID:/esp32_C3/internal_communication_client_0.1/main/include -IE:/espidf/v5.4.1/esp-idf/components/newlib/platform_include -IE:/espidf/v5.4.1/esp-idf/components/freertos/config/include -IE:/espidf/v5.4.1/esp-idf/components/freertos/config/include/freertos -IE:/espidf/v5.4.1/esp-idf/components/freertos/config/riscv/include -IE:/espidf/v5.4.1/esp-idf/components/freertos/FreeRTOS-Kernel/include -IE:/espidf/v5.4.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include -IE:/espidf/v5.4.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos -IE:/espidf/v5.4.1/esp-idf/components/freertos/esp_additions/include -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/include -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/include/soc -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/include/soc/esp32c3 -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/dma/include -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/ldo/include -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/debug_probe/include -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/port/esp32c3/. -IE:/espidf/v5.4.1/esp-idf/components/esp_hw_support/port/esp32c3/include -IE:/espidf/v5.4.1/esp-idf/components/heap/include -IE:/espidf/v5.4.1/esp-idf/components/heap/tlsf -IE:/espidf/v5.4.1/esp-idf/components/log/include -IE:/espidf/v5.4.1/esp-idf/components/soc/include -IE:/espidf/v5.4.1/esp-idf/components/soc/esp32c3 -IE:/espidf/v5.4.1/esp-idf/components/soc/esp32c3/include -IE:/espidf/v5.4.1/esp-idf/components/soc/esp32c3/register -IE:/espidf/v5.4.1/esp-idf/components/hal/platform_port/include -IE:/espidf/v5.4.1/esp-idf/components/hal/esp32c3/include -IE:/espidf/v5.4.1/esp-idf/components/hal/include -IE:/espidf/v5.4.1/esp-idf/components/esp_rom/include -IE:/espidf/v5.4.1/esp-idf/components/esp_rom/esp32c3/include -IE:/espidf/v5.4.1/esp-idf/components/esp_rom/esp32c3/include/esp32c3 -IE:/espidf/v5.4.1/esp-idf/components/esp_rom/esp32c3 -IE:/espidf/v5.4.1/esp-idf/components/esp_common/include -IE:/espidf/v5.4.1/esp-idf/components/esp_system/include -IE:/espidf/v5.4.1/esp-idf/components/esp_system/port/soc -IE:/espidf/v5.4.1/esp-idf/components/esp_system/port/include/riscv -IE:/espidf/v5.4.1/esp-idf/components/esp_system/port/include/private -IE:/espidf/v5.4.1/esp-idf/components/riscv/include -IE:/espidf/v5.4.1/esp-idf/components/lwip/include -IE:/espidf/v5.4.1/esp-idf/components/lwip/include/apps -IE:/espidf/v5.4.1/esp-idf/components/lwip/include/apps/sntp -IE:/espidf/v5.4.1/esp-idf/components/lwip/lwip/src/include -IE:/espidf/v5.4.1/esp-idf/components/lwip/port/include -IE:/espidf/v5.4.1/esp-idf/components/lwip/port/freertos/include -IE:/espidf/v5.4.1/esp-idf/components/lwip/port/esp32xx/include -IE:/espidf/v5.4.1/esp-idf/components/lwip/port/esp32xx/include/arch -IE:/espidf/v5.4.1/esp-idf/components/lwip/port/esp32xx/include/sys -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_gpio/include -IE:/espidf/v5.4.1/esp-idf/components/esp_pm/include -IE:/espidf/v5.4.1/esp-idf/components/mbedtls/port/include -IE:/espidf/v5.4.1/esp-idf/components/mbedtls/mbedtls/include -IE:/espidf/v5.4.1/esp-idf/components/mbedtls/mbedtls/library -IE:/espidf/v5.4.1/esp-idf/components/mbedtls/esp_crt_bundle/include -IE:/espidf/v5.4.1/esp-idf/components/mbedtls/mbedtls/3rdparty/everest/include -IE:/espidf/v5.4.1/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m -IE:/espidf/v5.4.1/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -IE:/espidf/v5.4.1/esp-idf/components/esp_app_format/include -IE:/espidf/v5.4.1/esp-idf/components/esp_bootloader_format/include -IE:/espidf/v5.4.1/esp-idf/components/app_update/include -IE:/espidf/v5.4.1/esp-idf/components/bootloader_support/include -IE:/espidf/v5.4.1/esp-idf/components/bootloader_support/bootloader_flash/include -IE:/espidf/v5.4.1/esp-idf/components/esp_partition/include -IE:/espidf/v5.4.1/esp-idf/components/efuse/include -IE:/espidf/v5.4.1/esp-idf/components/efuse/esp32c3/include -IE:/espidf/v5.4.1/esp-idf/components/esp_mm/include -IE:/espidf/v5.4.1/esp-idf/components/spi_flash/include -IE:/espidf/v5.4.1/esp-idf/components/esp_security/include -IE:/espidf/v5.4.1/esp-idf/components/pthread/include -IE:/espidf/v5.4.1/esp-idf/components/esp_timer/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_gptimer/include -IE:/espidf/v5.4.1/esp-idf/components/esp_ringbuf/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_uart/include -IE:/espidf/v5.4.1/esp-idf/components/vfs/include -IE:/espidf/v5.4.1/esp-idf/components/app_trace/include -IE:/espidf/v5.4.1/esp-idf/components/esp_event/include -IE:/espidf/v5.4.1/esp-idf/components/nvs_flash/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_pcnt/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_spi/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_mcpwm/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_ana_cmpr/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_i2s/include -IE:/espidf/v5.4.1/esp-idf/components/sdmmc/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_sdmmc/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_sdspi/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_sdio/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_dac/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_rmt/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_tsens/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_sdm/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_i2c/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_ledc/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_parlio/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_usb_serial_jtag/include -IE:/espidf/v5.4.1/esp-idf/components/driver/deprecated -IE:/espidf/v5.4.1/esp-idf/components/driver/i2c/include -IE:/espidf/v5.4.1/esp-idf/components/driver/touch_sensor/include -IE:/espidf/v5.4.1/esp-idf/components/driver/twai/include -IE:/espidf/v5.4.1/esp-idf/components/esp_phy/include -IE:/espidf/v5.4.1/esp-idf/components/esp_phy/esp32c3/include -IE:/espidf/v5.4.1/esp-idf/components/esp_vfs_console/include -IE:/espidf/v5.4.1/esp-idf/components/esp_netif/include -IE:/espidf/v5.4.1/esp-idf/components/wpa_supplicant/include -IE:/espidf/v5.4.1/esp-idf/components/wpa_supplicant/port/include -IE:/espidf/v5.4.1/esp-idf/components/wpa_supplicant/esp_supplicant/include -IE:/espidf/v5.4.1/esp-idf/components/esp_coex/include -IE:/espidf/v5.4.1/esp-idf/components/esp_wifi/include -IE:/espidf/v5.4.1/esp-idf/components/esp_wifi/include/local -IE:/espidf/v5.4.1/esp-idf/components/esp_wifi/wifi_apps/include -IE:/espidf/v5.4.1/esp-idf/components/esp_wifi/wifi_apps/nan_app/include -IE:/espidf/v5.4.1/esp-idf/components/unity/include -IE:/espidf/v5.4.1/esp-idf/components/unity/unity/src -IE:/espidf/v5.4.1/esp-idf/components/cmock/CMock/src -IE:/espidf/v5.4.1/esp-idf/components/console -IE:/espidf/v5.4.1/esp-idf/components/http_parser -IE:/espidf/v5.4.1/esp-idf/components/esp-tls -IE:/espidf/v5.4.1/esp-idf/components/esp-tls/esp-tls-crypto -IE:/espidf/v5.4.1/esp-idf/components/esp_adc/include -IE:/espidf/v5.4.1/esp-idf/components/esp_adc/interface -IE:/espidf/v5.4.1/esp-idf/components/esp_adc/esp32c3/include -IE:/espidf/v5.4.1/esp-idf/components/esp_adc/deprecated/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_isp/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_cam/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_cam/interface -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_jpeg/include -IE:/espidf/v5.4.1/esp-idf/components/esp_driver_ppa/include -IE:/espidf/v5.4.1/esp-idf/components/esp_eth/include -IE:/espidf/v5.4.1/esp-idf/components/esp_gdbstub/include -IE:/espidf/v5.4.1/esp-idf/components/esp_hid/include -IE:/espidf/v5.4.1/esp-idf/components/tcp_transport/include -IE:/espidf/v5.4.1/esp-idf/components/esp_http_client/include -IE:/espidf/v5.4.1/esp-idf/components/esp_http_server/include -IE:/espidf/v5.4.1/esp-idf/components/esp_https_ota/include -IE:/espidf/v5.4.1/esp-idf/components/esp_https_server/include -IE:/espidf/v5.4.1/esp-idf/components/esp_psram/include -IE:/espidf/v5.4.1/esp-idf/components/esp_lcd/include -IE:/espidf/v5.4.1/esp-idf/components/esp_lcd/interface -IE:/espidf/v5.4.1/esp-idf/components/protobuf-c/protobuf-c -IE:/espidf/v5.4.1/esp-idf/components/protocomm/include/common -IE:/espidf/v5.4.1/esp-idf/components/protocomm/include/security -IE:/espidf/v5.4.1/esp-idf/components/protocomm/include/transports -IE:/espidf/v5.4.1/esp-idf/components/protocomm/include/crypto/srp6a -IE:/espidf/v5.4.1/esp-idf/components/protocomm/proto-c -IE:/espidf/v5.4.1/esp-idf/components/esp_local_ctrl/include -IE:/espidf/v5.4.1/esp-idf/components/espcoredump/include -IE:/espidf/v5.4.1/esp-idf/components/espcoredump/include/port/riscv -IE:/espidf/v5.4.1/esp-idf/components/wear_levelling/include -IE:/espidf/v5.4.1/esp-idf/components/fatfs/diskio -IE:/espidf/v5.4.1/esp-idf/components/fatfs/src -IE:/espidf/v5.4.1/esp-idf/components/fatfs/vfs -IE:/espidf/v5.4.1/esp-idf/components/idf_test/include -IE:/espidf/v5.4.1/esp-idf/components/idf_test/include/esp32c3 -IE:/espidf/v5.4.1/esp-idf/components/ieee802154/include -IE:/espidf/v5.4.1/esp-idf/components/json/cJSON -IE:/espidf/v5.4.1/esp-idf/components/mqtt/esp-mqtt/include -IE:/espidf/v5.4.1/esp-idf/components/nvs_sec_provider/include -IE:/espidf/v5.4.1/esp-idf/components/rt/include -IE:/espidf/v5.4.1/esp-idf/components/spiffs/include -IE:/espidf/v5.4.1/esp-idf/components/wifi_provisioning/include -march=rv32imc_zicsr_zifencei -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-error=extra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -nostartfiles -Os -freorder-blocks -fmacro-prefix-map=D:/esp32_C3/internal_communication_client_0.1=. -fmacro-prefix-map=E:/espidf/v5.4.1/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/mesh_broadcast.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\mesh_broadcast.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/mesh_broadcast.c.obj -c D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c: In function 'handle_broadcast_message': D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:13: error: implicit declaration of function 'log_received_message' [-Wimplicit-function-declaration] 141 | log_received_message("鎺у埗鍛戒护", from, message, len); | ^~~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:61: error: 'len' undeclared (first use in this function) 141 | log_received_message("鎺у埗鍛戒护", from, message, len); | ^~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:141:61: note: each undeclared identifier is reported only once for each function it appears in D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:142:13: error: implicit declaration of function 'process_control_command' [-Wimplicit-function-declaration] 142 | process_control_command(message); | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:2: D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:62: error: expected ')' before 'MACSTR' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:88: note: in definition of macro 'LOG_FORMAT' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:60: note: to match this '(' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ In file included from E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:15: E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:98:31: error: format '%lu' expects a matching 'long unsigned int' argument [-Werror=format=] 98 | #define LOG_COLOR_E "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_E' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:86: note: in expansion of macro 'LOG_FORMAT' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:98:31: error: format '%s' expects a matching 'char *' argument [-Werror=format=] 98 | #define LOG_COLOR_E "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_E' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:86: note: in expansion of macro 'LOG_FORMAT' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:98:31: error: format '%d' expects a matching 'int' argument [-Werror=format=] 98 | #define LOG_COLOR_E "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_E' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:182:86: note: in expansion of macro 'LOG_FORMAT' 182 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:62: error: expected ')' before 'MACSTR' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:88: note: in definition of macro 'LOG_FORMAT' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:183:60: note: to match this '(' 183 | else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:99:31: error: format '%lu' expects a matching 'long unsigned int' argument [-Werror=format=] 99 | #define LOG_COLOR_W "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_W' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:183:86: note: in expansion of macro 'LOG_FORMAT' 183 | else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:99:31: error: format '%s' expects a matching 'char *' argument [-Werror=format=] 99 | #define LOG_COLOR_W "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_W' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:183:86: note: in expansion of macro 'LOG_FORMAT' 183 | else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:99:31: error: format '%d' expects a matching 'int' argument [-Werror=format=] 99 | #define LOG_COLOR_W "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_W' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:183:86: note: in expansion of macro 'LOG_FORMAT' 183 | else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:62: error: expected ')' before 'MACSTR' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:88: note: in definition of macro 'LOG_FORMAT' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:184:60: note: to match this '(' 184 | else if (level==ESP_LOG_DEBUG ) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:101:31: error: format '%lu' expects a matching 'long unsigned int' argument [-Werror=format=] 101 | #define LOG_COLOR_D "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_D' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:184:86: note: in expansion of macro 'LOG_FORMAT' 184 | else if (level==ESP_LOG_DEBUG ) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:101:31: error: format '%s' expects a matching 'char *' argument [-Werror=format=] 101 | #define LOG_COLOR_D "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_D' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:184:86: note: in expansion of macro 'LOG_FORMAT' 184 | else if (level==ESP_LOG_DEBUG ) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:101:31: error: format '%d' expects a matching 'int' argument [-Werror=format=] 101 | #define LOG_COLOR_D "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_D' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:184:86: note: in expansion of macro 'LOG_FORMAT' 184 | else if (level==ESP_LOG_DEBUG ) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:62: error: expected ')' before 'MACSTR' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:88: note: in definition of macro 'LOG_FORMAT' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:185:60: note: to match this '(' 185 | else if (level==ESP_LOG_VERBOSE ) { esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:102:31: error: format '%lu' expects a matching 'long unsigned int' argument [-Werror=format=] 102 | #define LOG_COLOR_V "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_V' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:185:86: note: in expansion of macro 'LOG_FORMAT' 185 | else if (level==ESP_LOG_VERBOSE ) { esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:102:31: error: format '%s' expects a matching 'char *' argument [-Werror=format=] 102 | #define LOG_COLOR_V "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_V' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:185:86: note: in expansion of macro 'LOG_FORMAT' 185 | else if (level==ESP_LOG_VERBOSE ) { esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:102:31: error: format '%d' expects a matching 'int' argument [-Werror=format=] 102 | #define LOG_COLOR_V "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_V' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:185:86: note: in expansion of macro 'LOG_FORMAT' 185 | else if (level==ESP_LOG_VERBOSE ) { esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:62: error: expected ')' before 'MACSTR' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:88: note: in definition of macro 'LOG_FORMAT' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:186:60: note: to match this '(' 186 | else { esp_log_write(ESP_LOG_INFO, tag, LOG_FORMAT(I, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:100:31: error: format '%lu' expects a matching 'long unsigned int' argument [-Werror=format=] 100 | #define LOG_COLOR_I "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_I' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:186:86: note: in expansion of macro 'LOG_FORMAT' 186 | else { esp_log_write(ESP_LOG_INFO, tag, LOG_FORMAT(I, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:100:31: error: format '%s' expects a matching 'char *' argument [-Werror=format=] 100 | #define LOG_COLOR_I "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_I' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:186:86: note: in expansion of macro 'LOG_FORMAT' 186 | else { esp_log_write(ESP_LOG_INFO, tag, LOG_FORMAT(I, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log_color.h:100:31: error: format '%d' expects a matching 'int' argument [-Werror=format=] 100 | #define LOG_COLOR_I "" | ^~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:62:37: note: in expansion of macro 'LOG_COLOR_I' 62 | #define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:186:86: note: in expansion of macro 'LOG_FORMAT' 186 | else { esp_log_write(ESP_LOG_INFO, tag, LOG_FORMAT(I, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \ | ^~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:205:38: note: in expansion of macro 'ESP_LOG_LEVEL' 205 | if (_ESP_LOG_ENABLED(level)) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~ E:/espidf/v5.4.1/esp-idf/components/log/include/esp_log.h:113:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 113 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ D:/esp32_C3/internal_communication_client_0.1/main/mesh_broadcast.c:146:13: note: in expansion of macro 'ESP_LOGW' 146 | ESP_LOGW("BROADCAST_RX", "鏈煡骞挎挱绫诲瀷 %d 鏉ヨ嚜 " MACSTR, | ^~~~~~~~ cc1.exe: some warnings being treated as errors ninja: build stopped: subcommand failed. * 终端进程“e:\espidf\espressif\tools\ninja\1.12.1\ninja.EXE”已终止,退出代码: 1。
最新发布
06-28
<think>我们遇到了多个编译错误,主要问题包括:1.变量未声明(如'src_addr', 'len','msg_type')2.隐式函数声明(如'log_received_message', 'process_control_command', 'update_configuration')3.日志格式错误(特别是MACSTR的使用)4.中文字符乱码问题(可能是文件编码问题)解决方案:1.确保所有变量在使用前已经声明。2.在使用函数之前进行声明或定义,或者包含声明这些函数的头文件。3.正确使用MACSTR宏:需要将MAC地址通过MAC2STR展开成6个字节作为参数。4.将源文件保存为UTF-8编码,并确保中文字符正确显示。根据错误信息,我们注意到在函数`handle_broadcast_message`中,变量`src_addr`、`len`、`msg_type`未声明。同时,函数`log_received_message`、`process_control_command`、`update_configuration`在使用前未声明。另外,在日志打印中,我们使用了`MACSTR`,但是没有正确使用`MAC2STR`宏来展开MAC地址。我们重新整理代码,并修正上述问题。以下是修正后的`mesh_broadcast.c`文件:</think># 解决ESP-IDF v5.4.1编译错误:变量未声明与函数隐式声明问题 您遇到的编译错误主要涉及变量未声明、函数隐式声明和MAC地址格式化问题。我将提供完整的解决方案,包括修正代码和项目结构调整。 ## 问题分析 ### 主要错误: 1. **变量未声明**:`src_addr`、`len`、`msg_type`等变量在使用前未声明 2. **函数隐式声明**:`log_received_message`、`process_control_command`等函数未声明 3. **MACSTR使用错误**:日志中的MACSTR宏使用不当 4. **中文字符问题**:日志中的中文字符显示为乱码 ### 根本原因: - 变量作用域管理不当 - 函数声明缺失 - MAC地址处理不正确 - 源文件未使用UTF-8编码 ## 完整解决方案 ### 1. 修正mesh_broadcast.c文件 ```c #include "mesh_broadcast.h" #include <string.h> // 静态函数声明 static void log_received_message(const char *prefix, const mesh_addr_t *from, const char *message, uint16_t len); void handle_broadcast_message(const mesh_addr_t *from, const uint8_t *data, uint16_t size) { if (size < 1) { ESP_LOGE(TAG, "无效广播消息大小: %u", size); return; } // 声明所有需要的变量 uint8_t msg_type = data[0]; const char *message_ptr = (const char *)(data + 1); uint16_t len = size - 1; char src_addr_str[18]; // MAC地址字符串缓冲区 (17字符 + null终止符) // 格式化MAC地址 snprintf(src_addr_str, sizeof(src_addr_str), MACSTR, MAC2STR(from->addr)); switch (msg_type) { case CONTROL_COMMAND: log_received_message("控制命令", from, message_ptr, len); process_control_command(message_ptr); break; case CONFIG_UPDATE: log_received_message("配置更新", from, message_ptr, len); update_configuration(message_ptr); break; default: ESP_LOGW(TAG, "未知广播类型 %d 来自 %s", msg_type, src_addr_str); break; } } // 静态函数实现 static void log_received_message(const char *prefix, const mesh_addr_t *from, const char *message, uint16_t len) { char src_addr[18]; snprintf(src_addr, sizeof(src_addr), MACSTR, MAC2STR(from->addr)); // 安全截断长消息 const uint16_t max_display = 64; uint16_t display_len = (len > max_display) ? max_display : len; ESP_LOGI(TAG, "%s 来自 %s: %.*s%s", prefix, src_addr, display_len, message, (len > max_display) ? "..." : ""); } ``` ### 2. 完善mesh_broadcast.h头文件 ```c #ifndef MESH_BROADCAST_H #define MESH_BROADCAST_H #include "esp_mesh.h" #include "esp_log.h" // 消息类型定义 typedef enum { CONTROL_COMMAND = 0x01, CONFIG_UPDATE = 0x02 } broadcast_type_t; // MAC地址处理宏 #define MAC2STR(mac) (mac)[0], (mac)[1], (mac)[2], (mac)[3], (mac)[4], (mac)[5] #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" // 日志标签 #define TAG "MeshBroadcast" // 函数声明 void handle_broadcast_message(const mesh_addr_t *from, const uint8_t *data, uint16_t size); void process_control_command(const char *command); void update_configuration(const char *config); #endif // MESH_BROADCAST_H ``` ### 3. 创建命令处理器文件 **command_processor.c** ```c #include "mesh_broadcast.h" void process_control_command(const char *command) { // 实际命令处理逻辑 ESP_LOGI(TAG, "处理控制命令: %s", command); // 添加您的命令处理代码 } void update_configuration(const char *config) { // 实际配置更新逻辑 ESP_LOGI(TAG, "更新配置: %s", config); // 添加您的配置更新代码 } ``` ### 4. 解决中文编码问题 1. **在VS Code中设置文件编码**: - 右下角点击编码指示器(如"UTF-8") - 选择"Save with Encoding" → "UTF-8" 2. **在CMakeLists.txt中强制UTF-8编码**: ```cmake # 在main组件的CMakeLists.txt中添加 add_compile_options(-finput-charset=UTF-8 -fexec-charset=UTF-8) ``` ### 5. 项目结构调整 ``` main/ ├── include/ │ └── mesh_broadcast.h ├── src/ │ ├── mesh_broadcast.c │ └── command_processor.c └── CMakeLists.txt ``` **CMakeLists.txt** ```cmake # 主组件CMake配置 idf_component_register( SRCS "src/mesh_broadcast.c" "src/command_processor.c" INCLUDE_DIRS "include" REQUIRES esp_mesh esp_log ) # 启用严格编译选项 add_compile_options( -Wall -Werror -Wextra -Wformat=2 -Wno-format-extra-args -finput-charset=UTF-8 -fexec-charset=UTF-8 ) # 设置C标准 set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) ``` ## 关键修正点解释 ### 1. 变量声明管理 - **问题**:`src_addr`、`len`等变量在使用前未声明 - **解决方案**:在函数开头声明所有需要的变量 ```c uint8_t msg_type = data[0]; const char *message_ptr = (const char *)(data + 1); uint16_t len = size - 1; char src_addr_str[18]; // 明确声明变量 ``` ### 2. 函数声明处理 - **问题**:`log_received_message`等函数隐式声明 - **解决方案**: - 在文件开头声明静态函数 - 在头文件中声明公共函数 ```c // 静态函数声明 static void log_received_message(const char *prefix, const mesh_addr_t *from, const char *message, uint16_t len); ``` ### 3. MAC地址正确使用 - **问题**:`MACSTR`宏使用不当 - **解决方案**:先格式化MAC地址到缓冲区 ```c char src_addr[18]; snprintf(src_addr, sizeof(src_addr), MACSTR, MAC2STR(from->addr)); ``` ### 4. 中文字符处理 - **问题**:日志中文字符显示为乱码 - **解决方案**: - 确保文件保存为UTF-8编码 - 添加编译选项强制UTF-8 ```cmake add_compile_options(-finput-charset=UTF-8 -fexec-charset=UTF-8) ``` ## 预防措施 ### 1. 变量声明最佳实践 - 在函数开头声明所有局部变量 - 初始化变量时赋值 - 使用有意义的变量名 ### 2. 函数管理规范 ```c // 头文件中的函数声明规范 #ifndef MODULE_H #define MODULE_H // 公共函数声明 void public_function(void); // 私有函数声明(仅在头文件中可见) static inline void private_function(void) { /* 实现 */ } #endif ``` ### 3. 安全日志宏 ```c // 安全日志宏,避免格式错误 #define SAFE_LOG(level, tag, format, ...) \ do { \ if (sizeof(format) > 0) { \ ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \ } \ } while(0) // 使用示例 SAFE_LOG(ESP_LOG_INFO, TAG, "来自 %s 的消息", src_addr); ``` ## 完整工作流程验证 1. **保存所有文件为UTF-8编码** 2. **清理并重新编译项目**: ```bash idf.py fullclean idf.py build ``` 3. **烧录并监控**: ```bash idf.py -p PORT flash monitor ``` ## 总结 通过以下步骤解决编译错误: 1. **声明所有变量**:在函数开头明确声明所有使用的变量 2. **添加函数声明**:为所有函数添加前置声明或包含头文件 3. **正确使用MAC地址**:先格式化MAC地址到缓冲区再使用 4. **处理中文编码**:确保文件使用UTF-8编码并添加编译选项 5. **优化项目结构**:分离功能到不同文件,使用头文件管理声明 这些修改符合ESP-IDF v5.4.1的最佳实践,解决了当前编译错误的同时提高了代码的可维护性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值