forked from Minki/linux
aa3233ea7b
Adding back the nonstandard ioctl commands caused -Wrestrict warnings
when building with 'make W=1':
drivers/staging/r8188eu/os_dep/ioctl_linux.c: In function 'rtw_mp_read_rf':
drivers/staging/r8188eu/os_dep/ioctl_linux.c:5515:27: error: 'sprintf' argument 3 overlaps destination object 'extra' [-Werror=restrict]
5515 | sprintf(extra, "%s %d", extra, strtou);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/os_dep/ioctl_linux.c:5470:54: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
5470 | struct iw_point *wrqu, char *extra)
| ~~~~~~^~~~~
Change these to the same construct used elsewhere in that driver,
with an offset to the string to make the warning go away.
The ioctl commands were previously removed, and it's unlikely that
anything is actually using them, so ideally I would prefer to have
them removed again.
The lack of range checking of the 'extra' output buffer is also
slightly worrying, but I did not check whether this could cause
harm.
Fixes:
|
||
---|---|---|
.. | ||
android | ||
axis-fifo | ||
board | ||
clocking-wizard | ||
emxx_udc | ||
fbtft | ||
fieldbus | ||
fwserial | ||
gdm724x | ||
greybus | ||
gs_fpgaboot | ||
iio | ||
ks7010 | ||
media | ||
most | ||
mt7621-dma | ||
mt7621-dts | ||
mt7621-pci | ||
netlogic | ||
nvec | ||
octeon | ||
octeon-usb | ||
olpc_dcon | ||
pi433 | ||
qlge | ||
r8188eu | ||
ralink-gdma | ||
rtl8192e | ||
rtl8192u | ||
rtl8712 | ||
rtl8723bs | ||
rts5208 | ||
sm750fb | ||
unisys | ||
vc04_services | ||
vme | ||
vt6655 | ||
vt6656 | ||
wfx | ||
wlan-ng | ||
Kconfig | ||
Makefile |