I encountered an error while using espnow on esp-idf v5.0.2. Previously, on esp-idf 4.4.4, the build process worked perfectly. However, with the latest version, I am facing the following error:
../../../components/esp_hw_support/include/esp_mac.h:14:16: error: format '%x' expects argument of type 'unsigned int *', but argument 7 has type 'uint32_t *' {aka 'long unsigned int *'} [-Werror=format=]
14 | #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../components/utils/src/espnow_utils.c:68:31: note: in expansion of macro 'MACSTR'
68 | int ret = sscanf(mac_str, MACSTR, mac_data, mac_data + 1, mac_data + 2,
| ^~~~~~
../../../components/esp_hw_support/include/esp_mac.h:14:40: note: format string is defined here
14 | #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
| ~~~^
| |
| unsigned int *
| %02lx
../../../components/esp_hw_support/include/esp_mac.h:14:16: error: format '%x' expects argument of type 'unsigned int *', but argument 8 has type 'uint32_t *' {aka 'long unsigned int *'} [-Werror=format=]
14 | #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../components/utils/src/espnow_utils.c:68:31: note: in expansion of macro 'MACSTR'
68 | int ret = sscanf(mac_str, MACSTR, mac_data, mac_data + 1, mac_data + 2,
| ^~~~~~
../../../components/esp_hw_support/include/esp_mac.h:14:45: note: format string is defined here
14 | #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
| ~~~^
| |
| unsigned int *
One potential solution is to modify the appropriate format specifier to match the correct data type. However, this approach might require additional time and effort. It would be helpful to know if there is a way to disable the checking of this particular format to proceed with the build process.
Hi developers,
I encountered an error while using espnow on esp-idf v5.0.2. Previously, on esp-idf 4.4.4, the build process worked perfectly. However, with the latest version, I am facing the following error:
One potential solution is to modify the appropriate format specifier to match the correct data type. However, this approach might require additional time and effort. It would be helpful to know if there is a way to disable the checking of this particular format to proceed with the build process.