rtl8852au icon indicating copy to clipboard operation
rtl8852au copied to clipboard

Lots of warning in build

Open Webifi opened this issue 2 years ago • 1 comments

Getting a bunch of warnings when building on Ubuntu 22.04, like:

/home/routeradmin/rtl8852au/phl/hal_g6/mac/mac_ax/hw.c: In function ‘cfg_mac_bw’:
/home/routeradmin/rtl8852au/phl/hal_g6/mac/mac_ax/hw.c:1586:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1586 |                 txsc80 = rtw_hal_bb_get_txsc(hal_com, cfg->pri_ch,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1587 |                                              cfg->central_ch, cfg->cbw,
      |                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~
 1588 |                                              CHANNEL_WIDTH_80);
      |                                              ~~~~~~~~~~~~~~~~~
/home/routeradmin/rtl8852au/phl/hal_g6/mac/mac_ax/hw.c:1590:9: note: here
 1590 |         case CHANNEL_WIDTH_80:

and

/home/routeradmin/rtl8852au/os_dep/linux/ioctl_mp.c:1018:9: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
 1018 |         u8 input[wrqu->data.length + 1];
      |         ^~
/home/routeradmin/rtl8852au/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_arx’:

Are these expected/normal?

(Driver seems to work with this device, VID_0BDA PID_885C, though haven't tested thoroughly beyond connecting to an access point and doing a speed test.)

Webifi avatar May 21 '22 16:05 Webifi

The fix fir the fallthrough warnings will fail with an error on older versions of gcc. I have decided to live with them.

The ISO C99 warnings on variable length arguments are also harmless. You can ignore them as well.

lwfinger avatar May 21 '22 16:05 lwfinger