summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/i825xx/82596.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-09-20 12:55:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-20 13:33:22 +0300
commitaa3233ea7bdb6c4004f5032a3a07417ea51dc409 (patch)
tree7d9faa5614fa515a51ff6072bc9e137372c5c873 /drivers/net/ethernet/i825xx/82596.c
parent92dc0b1f46e12cfabd28d709bb34f7a39431b44f (diff)
downloadlinux-aa3233ea7bdb6c4004f5032a3a07417ea51dc409.tar.xz
staging: r8188eu: fix -Wrestrict warnings
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: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210920095525.1150678-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/i825xx/82596.c')
0 files changed, 0 insertions, 0 deletions