Monday, February 9, 2009

warning: missing sentinel in function call

warning: missing sentinel in function call

因為NULL不是一個正確的字元結束( terminated )資料型態,所以就會產生warning: missing sentinel in function call
#include 

int main() {
execl("/bin/ls", "ls", "-l", NULL);
return 0;
}

為了要避險這樣的情形產生。

#include

int main() {
execl("/bin/ls", "ls", "-l", (char *)NULL);
return 0;
}
這樣gcc就不會產生
warning: missing sentinel in function call

1 comment:

Anonymous said...

Magazines sρeak about their breeast aϲtives breаst size they desire.

Those who are scared of sսrgery but want Ьreast actives tоo havе elastic yօung breastѕ choose herbal healers.
Before breast aսgmentation, it's a Ԁifficult roast
to do well becauѕe.

Here іs my webb blog ... pills to increase breast size