jurobystricky / Netgear-A6210

AC1200 High Gain WiFi USB Adapter Linux kernel driver
290 stars 155 forks source link

Compiler warning on Linux kernel 4.13+ #82

Open genodeftest opened 6 years ago

genodeftest commented 6 years ago

After I fixed the bug in dc7e9b8 (referred to in #81), I got this warning:

$ LC_ALL=C make
export DBGFLAGS

*** Building driver with debug messages ***

cp -f os/linux/Makefile.6 /path/to/Netgear-A6210/os/linux/Makefile
make -C /lib/modules/4.13.4-200.fc26.x86_64/build DBGFLAGS=-DDBG SUBDIRS=/path/to/Netgear-A6210/os/linux modules
make[1]: Entering directory '/usr/src/kernels/4.13.4-200.fc26.x86_64'
  CC [M]  /path/to/Netgear-A6210/os/linux/../../os/linux/sta_ioctl.o
  CC [M]  /path/to/Netgear-A6210/os/linux/../../common/cmm_wpa.o
In file included from ./include/linux/bitmap.h:8:0,
                 from ./include/linux/cpumask.h:11,
                 from ./arch/x86/include/asm/cpumask.h:4,
                 from ./arch/x86/include/asm/msr.h:10,
                 from ./arch/x86/include/asm/processor.h:20,
                 from ./arch/x86/include/asm/cpufeature.h:4,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from ./include/linux/thread_info.h:37,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:80,
                 from ./include/linux/spinlock.h:50,
                 from ./include/linux/seqlock.h:35,
                 from ./include/linux/time.h:5,
                 from ./include/linux/stat.h:18,
                 from ./include/linux/module.h:10,
                 from /path/to/Netgear-A6210/include/os/rt_linux.h:14,
                 from /path/to/Netgear-A6210/include/rtmp_os.h:30,
                 from /path/to/Netgear-A6210/include/rtmp_comm.h:64,
                 from /path/to/Netgear-A6210/include/rt_config.h:34,
                 from /path/to/Netgear-A6210/os/linux/../../common/cmm_wpa.c:29:
/path/to/Netgear-A6210/os/linux/../../common/cmm_wpa.c: In Funktion »ConstructEapolMsg.constprop«:
./include/linux/string.h:324:9: Warnung: Argument 2 ist null, aber nichtnull wird erwartet [-Wnonnull]
  return __builtin_memmove(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/string.h:324:9: Anmerkung: in einem Aufruf der eingebauten Funktion »__builtin_memmove«
  CC [M]  /path/to/Netgear-A6210/os/linux/../../os/linux/cfg80211/cfg80211.o
  CC [M]  /path/to/Netgear-A6210/os/linux/../../os/linux/cfg80211/cfg80211_inf.o
  CC [M]  /path/to/Netgear-A6210/os/linux/../../os/linux/usb_main_dev.o
  LD [M]  /path/to/Netgear-A6210/os/linux/mt7662u_sta.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /path/to/Netgear-A6210/os/linux/mt7662u_sta.mod.o
  LD [M]  /path/to/Netgear-A6210/os/linux/mt7662u_sta.ko
make[1]: Leaving directory '/usr/src/kernels/4.13.4-200.fc26.x86_64'

and I have no clue how to fix it. It looks quite serious and might cause a bug and I haven't checked for security implications.