cilynx / rtl88x2bu

rtl88x2bu driver updated for current kernels.

Home Page:http://www.wolfteck.com/2018/02/22/wsky_1200mbps_wireless_usb_wifi_adapter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to resolve compilation issues with GCC 12.1

MaxG87 opened this issue · comments

GCC 12 improved its detection of tautological conditions and aborts if it finds one. This is mostly related to checks of pointer addresses which are guaranteed to be set. In most cases it seems as if not the pointer address but a value in the array the pointer points to should be checked.

I already created the branch fix-gcc12 and fixed some occasions. However, I could use some advices.

In some places I tried to fix the seemingly erroneous comparison. This means that I altered the behaviour of the code. I did not yet manage to use these changes on my own. Anyhow, if anyone could check these changes too or does better understand what the appropriate fix would be, I would be glad to get some response.

Now there are plenty of occasions in hal/phydm/phydm_soml.c and hal/phydm/phydm_debug.c left. I have no clue what a fix for these would look like. I am tempted to just suppress the corresponding error. I really would appreciate to get some advice how to fix this.

I merged the changes. Please open a new issue if you think a regression was introduced.