sysprog21 / vwifi

A virtual wireless device driver for Linux
MIT License
203 stars 39 forks source link

Warnings reported by Sparse #69

Open jserv opened 3 months ago

jserv commented 3 months ago

Sparse is a semantic checker for C programs; it can be used to find a number of potential problems with kernel code. While building with make C=1, Kbuild complained:

vwifi.c:1234:42: warning: incorrect type in assignment (different base types)
vwifi.c:1234:42:    expected unsigned short [usertype] beacon_interval
vwifi.c:1234:42:    got restricted __le16 [usertype]
./include/linux/spinlock.h:393:9: warning: context imbalance in 'vwifi_start_ap' - unexpected unlock
vwifi.c:1582:9: warning: context imbalance in 'vwifi_stop_ap' - unexpected unlock

Later, we may consider to introduce the Sparse into CI pipeline as LKMPG does.