Код: Выделить всё
idf_component_register(SRCS "wifi_manager.cpp"
INCLUDE_DIRS "include"
PRIV_REQUIRES "lwip" "esp_wifi" "log")
# Define strict warning flags for your own source files
set(MY_FLAGS
"-Wall"
"-Wextra"
"-Wpedantic"
"-Werror"
"-Werror=unused-function"
"-Werror=unused-variable"
"-Werror=unused-but-set-variable"
"-Werror=deprecated-declarations"
)
target_compile_options(${COMPONENT_LIB} PRIVATE ${MY_FLAGS})
Код: Выделить всё
#include "lwip/sockets.h"
Код: Выделить всё
/home/adrian/repos/esp-idf/components/lwip/include/lwip/sockets.h:8:2: error: #include_next is a GCC extension [-Werror]
8 | #include_next "lwip/sockets.h"
Код: Выделить всё
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#include "esp_wifi.h"
#pragma GCC diagnostic pop
Код: Выделить всё
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Werror"
#include "lwip/sockets.h"
#pragma GCC diagnostic pop
Подробнее здесь: https://stackoverflow.com/questions/790 ... on-esp-idf