Posted Mar 20, 2008 10:22 UTC (Thu) by msmeissn (subscriber, #13641)
In reply to: null pointers by cortana
Parent article: Who maintains dpkg?
If you mark up the function with __attribute__((sentinel)) then
it will warn.
All common functions are marked up already.
$ cat xx.c
#include <unistd.h>
void f() {
execl("hello","world","!",0);
}
$ gcc -Wall -O2 -c xx.c
xx.c: In function ‘f’:
xx.c:4: warning: missing sentinel in function call
$
I personally marked up X, GLIB and GTK for instance... :/
Ciao, Marcus
Posted Mar 22, 2008 17:03 UTC (Sat) by spitzak (guest, #4593)
[Link]
Aha! So that's what that damn warning means!
It would really help if the warning said "missing cast of 0 to varargs function" rather than
"missing sentinal"!