mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_wifi: Remove -Wno-format compile option for FTM example, iperf example, roaming example
This commit is contained in:
parent
14394ed783
commit
66465ad7d7
@ -1,3 +1,2 @@
|
||||
idf_component_register(SRCS "ftm_main.c"
|
||||
INCLUDE_DIRS ".")
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "nvs_flash.h"
|
||||
#include "cmd_system.h"
|
||||
#include "argtable3/argtable3.h"
|
||||
@ -170,7 +170,7 @@ static void ftm_process_report(void)
|
||||
log_ptr += sprintf(log_ptr, "%6d|", s_ftm_report[i].dlog_token);
|
||||
}
|
||||
if (g_report_lvl & BIT1) {
|
||||
log_ptr += sprintf(log_ptr, "%7u |", s_ftm_report[i].rtt);
|
||||
log_ptr += sprintf(log_ptr, "%7" PRIu32 " |", s_ftm_report[i].rtt);
|
||||
}
|
||||
if (g_report_lvl & BIT2) {
|
||||
log_ptr += sprintf(log_ptr, "%14llu |%14llu |%14llu |%14llu |", s_ftm_report[i].t1,
|
||||
@ -491,7 +491,7 @@ static int wifi_cmd_ftm(int argc, char **argv)
|
||||
free(s_ftm_report);
|
||||
s_ftm_report = NULL;
|
||||
s_ftm_report_num_entries = 0;
|
||||
ESP_LOGI(TAG_STA, "Estimated RTT - %d nSec, Estimated Distance - %d.%02d meters",
|
||||
ESP_LOGI(TAG_STA, "Estimated RTT - %" PRId32 " nSec, Estimated Distance - %" PRId32 ".%02" PRId32 " meters",
|
||||
s_rtt_est, s_dist_est / 100, s_dist_est % 100);
|
||||
} else {
|
||||
/* Failure case */
|
||||
|
@ -1,5 +1,3 @@
|
||||
idf_component_register(SRCS "cmd_wifi.c"
|
||||
"iperf_example_main.c"
|
||||
INCLUDE_DIRS ".")
|
||||
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_console.h"
|
||||
#include "argtable3/argtable3.h"
|
||||
@ -420,7 +421,9 @@ static int wifi_cmd_iperf(int argc, char **argv)
|
||||
}
|
||||
|
||||
|
||||
ESP_LOGI(TAG, "mode=%s-%s sip=%d.%d.%d.%d:%d, dip=%d.%d.%d.%d:%d, interval=%d, time=%d",
|
||||
ESP_LOGI(TAG, "mode=%s-%s sip=%" PRId32 ".%" PRId32 ".%" PRId32 ".%" PRId32 ":%d,\
|
||||
dip=%" PRId32 ".%" PRId32 ".%" PRId32 ".%" PRId32 ":%d,\
|
||||
interval=%" PRId32 ", time=%" PRId32 "",
|
||||
cfg.flag & IPERF_FLAG_TCP ? "tcp" : "udp",
|
||||
cfg.flag & IPERF_FLAG_SERVER ? "server" : "client",
|
||||
cfg.source_ip4 & 0xFF, (cfg.source_ip4 >> 8) & 0xFF, (cfg.source_ip4 >> 16) & 0xFF,
|
||||
|
@ -1,4 +1,3 @@
|
||||
# Embed CA, certificate & key directly into binary
|
||||
idf_component_register(SRCS "roaming_example.c"
|
||||
INCLUDE_DIRS ".")
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
@ -172,7 +173,7 @@ static char * get_btm_neighbor_list(uint8_t *report, size_t report_len)
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "RMM neigbor report bssid=" MACSTR
|
||||
" info=0x%x op_class=%u chan=%u phy_type=%u%s%s%s%s",
|
||||
" info=0x%" PRIx32 " op_class=%u chan=%u phy_type=%u%s%s%s%s",
|
||||
MAC2STR(nr), WPA_GET_LE32(nr + ETH_ALEN),
|
||||
nr[ETH_ALEN + 4], nr[ETH_ALEN + 5],
|
||||
nr[ETH_ALEN + 6],
|
||||
@ -186,7 +187,7 @@ static char * get_btm_neighbor_list(uint8_t *report, size_t report_len)
|
||||
/* , */
|
||||
len += snprintf(buf + len, MAX_NEIGHBOR_LEN - len, ",");
|
||||
/* bssid info */
|
||||
len += snprintf(buf + len, MAX_NEIGHBOR_LEN - len, "0x%04x", WPA_GET_LE32(nr + ETH_ALEN));
|
||||
len += snprintf(buf + len, MAX_NEIGHBOR_LEN - len, "0x%04" PRIx32 "", WPA_GET_LE32(nr + ETH_ALEN));
|
||||
len += snprintf(buf + len, MAX_NEIGHBOR_LEN - len, ",");
|
||||
/* operating class */
|
||||
len += snprintf(buf + len, MAX_NEIGHBOR_LEN - len, "%u", nr[ETH_ALEN + 4]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user