Skip to content

Commit 7ac365c

Browse files
committed
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 <[email protected]>
1 parent 13dd84e commit 7ac365c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/sdk/common/api/wifi/wifi_promisc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static struct eth_buffer eth_buffer;
110110
#ifdef CONFIG_PROMISC
111111
#define MAX_PACKET_FILTER_INFO 5
112112
#define FILTER_ID_INIT_VALUE 10
113-
rtw_packet_filter_info_t paff_array[MAX_PACKET_FILTER_INFO]={0, 0, 0, 0, 0};
113+
rtw_packet_filter_info_t paff_array[MAX_PACKET_FILTER_INFO]={{0}, {0}, {0}, {0}, {0}};
114114
static u8 packet_filter_enable_num = 0;
115115

116116
void promisc_init_packet_filter()
@@ -294,7 +294,7 @@ static void promisc_test(int duration, unsigned char len_used)
294294
while(1) {
295295
unsigned int current_time = rtw_get_current_time();
296296

297-
if(rtw_systime_to_ms(current_time - start_time) < duration) {
297+
if(rtw_systime_to_ms(current_time - start_time) < (unsigned int)duration) {
298298
frame = retrieve_frame();
299299

300300
if(frame) {
@@ -400,7 +400,7 @@ static void promisc_test_all(int duration, unsigned char len_used)
400400
while(1) {
401401
unsigned int current_time = rtw_get_current_time();
402402

403-
if(rtw_systime_to_ms(current_time - start_time) < duration) {
403+
if(rtw_systime_to_ms(current_time - start_time) < (unsigned int)duration) {
404404
frame = retrieve_frame();
405405

406406
if(frame) {

0 commit comments

Comments
 (0)