protocols/security: Remove -Wno-format compile option for examples

This commit is contained in:
Laukik Hase
2022-12-07 13:01:43 +05:30
parent 2e3c72a5d1
commit 184c09ea81
10 changed files with 13 additions and 14 deletions

View File

@@ -1,4 +1,3 @@
idf_component_register(SRCS "main.c" "dns_server.c"
INCLUDE_DIRS "include"
EMBED_FILES root.html)
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

View File

@@ -8,6 +8,7 @@
*/
#include <sys/param.h>
#include <inttypes.h>
#include "esp_log.h"
#include "esp_system.h"
@@ -149,7 +150,7 @@ static int parse_dns_request(char *req, size_t req_len, char *dns_reply, size_t
esp_netif_ip_info_t ip_info;
esp_netif_get_ip_info(esp_netif_get_handle_from_ifkey("WIFI_AP_DEF"), &ip_info);
ESP_LOGD(TAG, "Answer with PTR offset: 0x%X and IP 0x%X", ntohs(answer->ptr_offset), ip_info.ip.addr);
ESP_LOGD(TAG, "Answer with PTR offset: 0x%" PRIX16 " and IP 0x%" PRIX32, ntohs(answer->ptr_offset), ip_info.ip.addr);
answer->addr_len = htons(sizeof(ip_info.ip.addr));
answer->ip_addr = ip_info.ip.addr;