pi400kb icon indicating copy to clipboard operation
pi400kb copied to clipboard

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

Open Hermann-SW opened this issue 4 years ago • 1 comments

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
...

Hermann-SW avatar Oct 19 '21 17:10 Hermann-SW

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

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

Gadgetoid avatar Oct 21 '21 07:10 Gadgetoid