Skip to content

Commit 30aae22

Browse files
committed
chore: remove cmake warnings
1 parent 5b574ad commit 30aae22

File tree

7 files changed

+31
-10
lines changed

7 files changed

+31
-10
lines changed

components/at/src/at_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222
*
2323
*/
24-
#include "tcpip_adapter.h"
24+
#include "esp_netif.h"
2525

2626
#ifdef CONFIG_AT_ETHERNET_SUPPORT
2727
#include "string.h"

components/at/src/at_ota_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "esp_ota_ops.h"
3636
#include "esp_partition.h"
3737

38-
#include "tcpip_adapter.h"
38+
#include "esp_netif.h"
3939

4040
#include "esp_at.h"
4141

components/at/src/at_web_server_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#include "esp_image_format.h"
4949
#include "esp_flash_partitions.h"
5050
#include "esp_partition.h"
51-
#include "tcpip_adapter.h"
51+
#include "esp_netif.h"
5252
#include "esp_ota_ops.h"
5353
#include "esp_flash_partitions.h"
5454
#include "esp_partition.h"

examples/at_http_webserver/components/atparse/parseframe.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "esp_log.h"
3636
#include "esp_system.h"
3737

38-
#include "esp_event_loop.h"
38+
#include "esp_event.h"
3939
#include "esp_wifi.h"
4040

4141
#include "atparse.h"
@@ -176,9 +176,12 @@ static esp_err_t at_wifi_event_handler(void *ctx, system_event_t *event)
176176
static void initialise_wifi(void)
177177
{
178178
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
179-
179+
// A workaround to avoid compilation warning (deprecated API: esp_event_loop_init)
180+
// TODO: esp-at should remove it after v2.2.0.0
181+
#pragma GCC diagnostic push
182+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
180183
ESP_ERROR_CHECK( esp_event_loop_init(at_wifi_event_handler, NULL) );
181-
184+
#pragma GCC diagnostic pop
182185
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
183186
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
184187
ESP_ERROR_CHECK( esp_wifi_start() );
@@ -204,7 +207,12 @@ static void init_at_module(void)
204207

205208
#endif
206209

210+
// A workaround to avoid compilation warning (deprecated API: tcpip_adapter_init)
211+
// TODO: esp-at should remove it after v2.2.0.0
212+
#pragma GCC diagnostic push
213+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
207214
tcpip_adapter_init();
215+
#pragma GCC diagnostic pop
208216
initialise_wifi();
209217

210218
esp_at_device_ops_regist(&esp_at_device_ops);

main/app_main.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222
*
2323
*/
24-
2524
#include <stdio.h>
2625
#include <string.h>
2726

@@ -31,7 +30,7 @@
3130
#include "nvs_flash.h"
3231

3332
#ifdef CONFIG_AT_WIFI_COMMAND_SUPPORT
34-
#include "esp_event_loop.h"
33+
#include "esp_event.h"
3534
#include "esp_wifi.h"
3635
#endif
3736

@@ -40,7 +39,6 @@
4039
#endif
4140

4241
#include "esp_at.h"
43-
4442
#include "at_interface.h"
4543

4644
#ifdef CONFIG_AT_WEB_SERVER_SUPPORT
@@ -64,7 +62,12 @@ static void initialise_wifi(void)
6462
{
6563
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
6664

65+
// A workaround to avoid compilation warning (deprecated API: esp_event_loop_init)
66+
// TODO: esp-at should remove it after v2.2.0.0
67+
#pragma GCC diagnostic push
68+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
6769
ESP_ERROR_CHECK( esp_event_loop_init(at_wifi_event_handler, NULL) );
70+
#pragma GCC diagnostic pop
6871

6972
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
7073
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
@@ -80,7 +83,12 @@ void app_main()
8083
#endif
8184

8285
nvs_flash_init();
86+
// A workaround to avoid compilation warning (deprecated API: tcpip_adapter_init)
87+
// TODO: esp-at should remove it after v2.2.0.0
88+
#pragma GCC diagnostic push
89+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
8390
tcpip_adapter_init();
91+
#pragma GCC diagnostic pop
8492
#ifdef CONFIG_AT_WIFI_COMMAND_SUPPORT
8593
initialise_wifi();
8694
#endif

main/interface/socket/at_socket_task.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "esp_log.h"
3636
#include "esp_system.h"
3737

38-
#include "tcpip_adapter.h"
38+
#include "esp_netif.h"
3939
#include "sys/socket.h"
4040
#include "netdb.h"
4141

main/interface/uart/at_uart_task.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,12 @@ void at_status_callback (esp_at_status_type status)
628628
break;
629629
case ESP_AT_STATUS_TRANSMIT:
630630
#if defined(CONFIG_IDF_TARGET_ESP32)
631+
// A workaround to avoid compilation warning (deprecated API: uart_enable_pattern_det_intr)
632+
// TODO: esp-at should remove it after v2.2.0.0
633+
#pragma GCC diagnostic push
634+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
631635
uart_enable_pattern_det_intr(esp_at_uart_port, '+', 3, ((APB_CLK_FREQ*20)/1000),((APB_CLK_FREQ*20)/1000), ((APB_CLK_FREQ*20)/1000));
636+
#pragma GCC diagnostic pop
632637
#endif
633638
break;
634639
}

0 commit comments

Comments
 (0)