Skip to content

Commit

Permalink
fix some variables not used warnings when build. (#7925)
Browse files Browse the repository at this point in the history
  • Loading branch information
newflydd committed Aug 7, 2023
1 parent 6648419 commit 7e7b303
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 3 additions & 5 deletions components/drivers/wlan/wlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ rt_err_t rt_wlan_dev_connect(struct rt_wlan_device *device, struct rt_wlan_info
rt_err_t rt_wlan_dev_fast_connect(struct rt_wlan_device *device, struct rt_wlan_info *info, const char *password, int password_len)
{
rt_err_t result = RT_EOK;
struct rt_wlan_buff buff;

int len = 0;
struct rt_wlan_buff buff = {0};

if (device == RT_NULL)
{
Expand Down Expand Up @@ -372,8 +370,8 @@ rt_err_t rt_wlan_dev_unregister_event_handler(struct rt_wlan_device *device, rt_

void rt_wlan_dev_indicate_event_handle(struct rt_wlan_device *device, rt_wlan_dev_event_t event, struct rt_wlan_buff *buff)
{
void *parameter[RT_WLAN_DEV_EVENT_NUM];
rt_wlan_dev_event_handler handler[RT_WLAN_DEV_EVENT_NUM];
void *parameter[RT_WLAN_DEV_EVENT_NUM] = {0};
rt_wlan_dev_event_handler handler[RT_WLAN_DEV_EVENT_NUM] = {0};
int i;
rt_base_t level;

Expand Down
3 changes: 0 additions & 3 deletions components/drivers/wlan/wlan_mgnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,6 @@ static void rt_wlan_join_scan_callback(int event, struct rt_wlan_buff *buff, voi
{
struct rt_wlan_info *info = RT_NULL;
struct rt_wlan_info *tgt_info = RT_NULL;
int ret = RT_EOK;

RT_ASSERT(event == RT_WLAN_EVT_SCAN_REPORT);
RT_ASSERT(buff != RT_NULL);
Expand Down Expand Up @@ -880,7 +879,6 @@ rt_err_t rt_wlan_connect(const char *ssid, const char *password)
struct rt_wlan_info info;
struct rt_wlan_complete_des *complete;
rt_uint32_t set = 0, recved = 0;
rt_uint32_t scan_retry = RT_WLAN_SCAN_RETRY_CNT;

/* sta dev Can't be NULL */
if (_sta_is_null())
Expand Down Expand Up @@ -1584,7 +1582,6 @@ rt_err_t rt_wlan_scan_with_info(struct rt_wlan_info *info)
rt_err_t err = RT_EOK;
struct rt_wlan_complete_des *complete;
rt_uint32_t set = 0, recved = 0;
static struct rt_wlan_info scan_filter_info;

if (_sta_is_null())
{
Expand Down

0 comments on commit 7e7b303

Please sign in to comment.