[forwarded from http://bugs.debian.org/200140] rechecked with 3.3 CVS and HEAD 20030706 #include <stdarg.h> #include <stdio.h> #include <stdlib.h> extern const char *program_name; static void printf_checked(const char *fmt, ...) { va_list args; va_start(args, fmt); if (vfprintf(stdout, fmt, args) < 0) { perror(program_name); exit(1); } va_end(args); } $ gcc -Wunreachable-code -c foo.c foo.c: In function `printf_checked': foo.c:16: warning: will never be executed This is the va_end statement, which will be executed, whenever the vfprintf() succeeds. The documentation says that this message can appear even if some part of the statement will not be executed, but that would be rather strange here, as va_end() is a builtin.
Same bug as bug 11370 which a fix has been sumbitted for approval. *** This bug has been marked as a duplicate of 11370 ***