zebulon2 / rtl8812au

RTL8812AU/21AU Driver for Linux
82 stars 23 forks source link

hal_mp.c:991:7: warning: statement will never be executed #4

Open sdack opened 6 years ago

sdack commented 6 years ago

Hello,

compiling the driver with gcc 7.2.1 throws the following warning:

_/usr/src/rtl8812au-zebulon2/hal/halmp.c:991:7: warning: statement will never be executed [-Wswitch-unreachable] u32 reg0xC50 = 0;

The code in question is at the start of a switch() { ... } statement:

...
    switch (ulAntennaRx) {
        u32 reg0xC50 = 0;
case ANTENNA_A:
...

You probably want to move it one scope up so that it becomes properly initialized with 0 or else might it contain random data.