DIGImend / digimend-kernel-drivers

DIGImend graphics tablet drivers for the Linux kernel
GNU General Public License v2.0
1.16k stars 172 forks source link

Build fails (implicit fallthrough) #649

Open ssterling opened 1 year ago

ssterling commented 1 year ago

The drivers simply won’t compile on my system due to an implicit fallthrough, despite the conspicuous /* FALLTHROUGH */ in the source. Following is the build output:

smp@sakura:/usr/src/digimend-kernel-drivers # sudo make
make -C /lib/modules/6.1.5-gentoo-r1-sakura/build M=/usr/src/digimend-kernel-drivers modules
make[1]: Entering directory '/usr/src/linux-6.1.5-gentoo-r1'
  CC [M]  /usr/src/digimend-kernel-drivers/hid-kye.o
  CC [M]  /usr/src/digimend-kernel-drivers/hid-uclogic-core.o
  CC [M]  /usr/src/digimend-kernel-drivers/hid-uclogic-rdesc.o
  CC [M]  /usr/src/digimend-kernel-drivers/hid-uclogic-params.o
/usr/src/digimend-kernel-drivers/hid-uclogic-params.c: In function ‘uclogic_params_init’:
/usr/src/digimend-kernel-drivers/hid-uclogic-params.c:1349:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
 1349 |                 if (bNumInterfaces != 3) {
      |                    ^
/usr/src/digimend-kernel-drivers/hid-uclogic-params.c:1367:9: note: here
 1367 |         case VID_PID(USB_VENDOR_ID_HUION,
      |         ^~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:250: /usr/src/digimend-kernel-drivers/hid-uclogic-params.o] Error 1
make[1]: *** [Makefile:1993: /usr/src/digimend-kernel-drivers] Error 2
make[1]: Leaving directory '/usr/src/linux-6.1.5-gentoo-r1'
make: *** [Makefile:25: modules] Error 2

Following is the output of gcc --version:

gcc (Gentoo 11.3.1_p20221209 p3) 11.3.1 20221209
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ssterling commented 1 year ago

Possible additional information: https://lore.kernel.org/lkml/CAHk-=wjBp3qpx=wehDZijejFBPixV=yVQVrPqK8saSEwGVrfAQ@mail.gmail.com/T/

c4em commented 1 year ago

Issue can be temporarily mitigated by disabling CONFIG_WERROR in the kernel configuration. This does not fix the warning but the compilation will finish.