https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093
--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> --- execl is a GCC builtin and GCC issues the -Wformat warning regardless of its declaration: $ cat t.c && ~/bin/gcc-5.1.0/bin/gcc -Wall t.c extern int execl (const char*, const char*, ...); int main (void) { return execl ("/bin/echo", (char*)0); } t.c: In function ‘main’: t.c:4:5: warning: not enough variable arguments to fit a sentinel [-Wformat=] return execl ("/bin/echo", (char*)0); ^ You're right though that the -Wnonnull warning is due to the nonnull attribute.