From 7ac365c258c2cf764e16dda3260228fbf34c8e6a Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Tue, 17 Apr 2018 16:31:56 +0800 Subject: [PATCH] rtl8195am - fix wifi_promisc.c warnings Fix the following warnings: [Warning] wifi_promisc.c@113,61: missing braces around initializer [-Wmissing-braces] [Warning] wifi_promisc.c@297,52: comparison between signed and unsigned integer expressions [-Wsign-compare] [Warning] wifi_promisc.c@403,52: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tony Wu --- .../TARGET_AMEBA/sdk/common/api/wifi/wifi_promisc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/TARGET_Realtek/TARGET_AMEBA/sdk/common/api/wifi/wifi_promisc.c b/targets/TARGET_Realtek/TARGET_AMEBA/sdk/common/api/wifi/wifi_promisc.c index ef924010d5..1939b9a047 100644 --- a/targets/TARGET_Realtek/TARGET_AMEBA/sdk/common/api/wifi/wifi_promisc.c +++ b/targets/TARGET_Realtek/TARGET_AMEBA/sdk/common/api/wifi/wifi_promisc.c @@ -110,7 +110,7 @@ static struct eth_buffer eth_buffer; #ifdef CONFIG_PROMISC #define MAX_PACKET_FILTER_INFO 5 #define FILTER_ID_INIT_VALUE 10 -rtw_packet_filter_info_t paff_array[MAX_PACKET_FILTER_INFO]={0, 0, 0, 0, 0}; +rtw_packet_filter_info_t paff_array[MAX_PACKET_FILTER_INFO]={{0}, {0}, {0}, {0}, {0}}; static u8 packet_filter_enable_num = 0; void promisc_init_packet_filter() @@ -294,7 +294,7 @@ static void promisc_test(int duration, unsigned char len_used) while(1) { unsigned int current_time = rtw_get_current_time(); - if(rtw_systime_to_ms(current_time - start_time) < duration) { + if(rtw_systime_to_ms(current_time - start_time) < (unsigned int)duration) { frame = retrieve_frame(); if(frame) { @@ -400,7 +400,7 @@ static void promisc_test_all(int duration, unsigned char len_used) while(1) { unsigned int current_time = rtw_get_current_time(); - if(rtw_systime_to_ms(current_time - start_time) < duration) { + if(rtw_systime_to_ms(current_time - start_time) < (unsigned int)duration) { frame = retrieve_frame(); if(frame) {