On Sun, Oct 06, 2019 at 05:09:55PM +0800, zhengbin wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/staging/rtl8723bs/core/rtw_xmit.c: In function update_attrib: > drivers/staging/rtl8723bs/core/rtw_xmit.c:680:7: warning: variable i set but not used [-Wunused-but-set-variable] > > It is not used since commit 554c0a3abf21 ("staging: > Add rtl8723bs sdio wifi driver") > > Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> > Signed-off-by: zhengbin <zhengbin13@xxxxxxxxxx> > --- > drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c > index b5dcb78..c24b524 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c > +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c > @@ -675,7 +675,6 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib) > > static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib *pattrib) > { > - uint i; > struct pkt_file pktfile; > struct sta_info *psta = NULL; > struct ethhdr etherhdr; > @@ -689,7 +688,7 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib > DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib); > > _rtw_open_pktfile(pkt, &pktfile); > - i = _rtw_pktfile_read(&pktfile, (u8 *)ðerhdr, ETH_HLEN); > + (void)_rtw_pktfile_read(&pktfile, (u8 *)ðerhdr, ETH_HLEN); No need for the (void) marking here. If you really are supposed to do something with the return value, then do something with it, don't ignore it. thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel