As in warning: missing sentinel in function call
Printable View
As in warning: missing sentinel in function call
Post your example.
How have you declared your function. Also what is the line above that error? As that will note the function call your in.
Please always paste code as well.
If this is all you have then simply googling the error would produce better results for you.
I didn't know the question was so complicated, or that the definition of "sentinel" would be contained in my code, but:
edit: okay I googled it. "error_popup" doesn't involve a sentinel tho...this is a -Wall error...Code:
pid = fork();
if (pid <0) {error_popup("fork() failed in \"tonote()\""); return;}
hmm... I am still not sure what is the problem. Generally "sentinel" refers to some kind of flag, e.g., a flag used to control a loop. Why not post the smallest and simplest code that demonstrates the problem?
It's truly amazing what "da interweb" and a search for an error message in the manual will reveal...
Short answer, your exec call is missing NULL.Quote:
sentinel
This function attribute ensures that a parameter in a function call is an explicit NULL. The attribute is only valid on variadic functions. By default, the sentinel is located at position zero, the last parameter of the function call. If an optional integer position argument P is supplied to the attribute, the sentinel must be located at position P counting backwards from the end of the argument list.
__attribute__ ((sentinel))
is equivalent to
__attribute__ ((sentinel(0)))
The attribute is automatically set with a position of 0 for the built-in functions execl and execlp. The built-in function execle has the attribute set with a position of 1.
A valid NULL in this context is defined as zero with any pointer type. If your system defines the NULL macro with an integer type then you need to add an explicit cast. GCC replaces stddef.h with a copy that redefines NULL appropriately.
The warnings for missing or incorrect sentinels are enabled with -Wformat.
Or whatever...