BK7258 Wi-Fi hotspot | independent fault reproduction Captured 2026-12-02T01:39:28+08:00 Compiler: arm-none-eabi-gcc.exe (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release) Compilation database: E:\Code\BK7258_demo\wifi_test_hotspot\build\bk7258\wifi_test_hotspot\bk7258_ap\compile_commands.json Matched translation unit: E:\Code\BK7258_demo\wifi_test_hotspot\ap\ap_main.c Temporary translation unit: D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c Reintroduced declaration: static const char *const tag = "hotspot"; Preserved target, preprocessor, include and warning options from the matched entry. Invoked -fsyntax-only in the original compilation directory, without object or dependency output. Compiler exit code: 1 In file included from D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:2: D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c: In function 'main': D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:34:17: error: passing argument 2 of 'bk_printf_ext' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 34 | BK_LOGE(tag, "AP initialization failed (%d)\r\n", ret); | ^~~ D:/BK/bk_avdk_smp_sdk/ap/include/components/log.h:58:74: note: in definition of macro 'BK_LOGE' 58 | #define BK_LOGE( tag, format, ... ) _BK_LOG_PRINTF(BK_LOG_ERROR, tag, format, ##__VA_ARGS__) | ^~~ In file included from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_assert.h:18, from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_generic.h:23, from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_include.h:23, from D:/BK/bk_avdk_smp_sdk/ap/include/os/os.h:17, from D:/BK/bk_avdk_smp_sdk/ap/include/components/log.h:21, from D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:2: D:/BK/bk_avdk_smp_sdk/ap/include/components/system.h:155:38: note: expected 'char *' but argument is of type 'const char * const' 155 | void bk_printf_ext(int level, char * tag, const char *fmt, ...); | ~~~~~~~^~~ In file included from D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:2: D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:40:17: error: passing argument 2 of 'bk_printf_ext' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 40 | BK_LOGE(tag, "SoftAP startup failed (%d)\r\n", ret); | ^~~ D:/BK/bk_avdk_smp_sdk/ap/include/components/log.h:58:74: note: in definition of macro 'BK_LOGE' 58 | #define BK_LOGE( tag, format, ... ) _BK_LOG_PRINTF(BK_LOG_ERROR, tag, format, ##__VA_ARGS__) | ^~~ In file included from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_assert.h:18, from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_generic.h:23, from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_include.h:23, from D:/BK/bk_avdk_smp_sdk/ap/include/os/os.h:17, from D:/BK/bk_avdk_smp_sdk/ap/include/components/log.h:21, from D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:2: D:/BK/bk_avdk_smp_sdk/ap/include/components/system.h:155:38: note: expected 'char *' but argument is of type 'const char * const' 155 | void bk_printf_ext(int level, char * tag, const char *fmt, ...); | ~~~~~~~^~~ In file included from D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:2: D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:44:13: error: passing argument 2 of 'bk_printf_ext' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 44 | BK_LOGI(tag, "READY: SoftAP ssid=%s ip=%s\r\n", HOTSPOT_SSID, HOTSPOT_IP); | ^~~ D:/BK/bk_avdk_smp_sdk/ap/include/components/log.h:74:73: note: in definition of macro 'BK_LOGI' 74 | #define BK_LOGI( tag, format, ... ) _BK_LOG_PRINTF(BK_LOG_INFO, tag, format, ##__VA_ARGS__) | ^~~ In file included from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_assert.h:18, from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_generic.h:23, from D:/BK/bk_avdk_smp_sdk/ap/include/common/bk_include.h:23, from D:/BK/bk_avdk_smp_sdk/ap/include/os/os.h:17, from D:/BK/bk_avdk_smp_sdk/ap/include/components/log.h:21, from D:\BK\article-drafts\hotspot-const-repro-ftgqptl_\ap_main.c:2: D:/BK/bk_avdk_smp_sdk/ap/include/components/system.h:155:38: note: expected 'char *' but argument is of type 'const char * const' 155 | void bk_printf_ext(int level, char * tag, const char *fmt, ...); | ~~~~~~~^~~ cc1.exe: all warnings being treated as errors