Gadgetoid / pi400kb

Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard
MIT License
269 stars 36 forks source link

passing arguments from incompatible pointer type on featue/toggle-hook branch #10

Open Hermann-SW opened 2 years ago

Hermann-SW commented 2 years ago
pi@raspberrypi400:~/test/pi400kb/build $ make
Scanning dependencies of target pi400kb
[  5%] Building C object CMakeFiles/pi400kb.dir/pi400.c.o
/home/pi/test/pi400kb/pi400.c: In function \u2018modprobe_libcomposite\u2019:
/home/pi/test/pi400kb/pi400.c:46:37: warning: passing argument 2 of \u2018execv\u2019 from incompatible pointer type [-Wincompatible-pointer-types]
         execv("/usr/sbin/modprobe", argv);
                                     ^~~~
In file included from /home/pi/test/pi400kb/pi400.c:13:
/usr/include/unistd.h:563:51: note: expected \u2018char * const*\u2019 but argument is of type \u2018const char **\u2019
 extern int execv (const char *__path, char *const __argv[])
                                       ~~~~~~~~~~~~^~~~~~~~
[ 11%] Building C object CMakeFiles/pi400kb.dir/gadget-hid.c.o
...
Gadgetoid commented 2 years ago

I’ll admit I saw these and was being lazy.

I’m going to enforce “-Werror” to stop this stuff creeping in.