Re: "eliminate warn_on_slowpath()" change causes many gcc-3.2.3warnings

From: Kyle McMartin
Date: Sat Jan 17 2009 - 16:39:24 EST


On Sat, Jan 17, 2009 at 01:07:58PM -0800, H. Peter Anvin wrote:
> Kyle McMartin wrote:
> >
> > How about something utterly evil? (Since you can't pass a zero-length
> > string to a printf attributed function either...)
> >
>
> ?!
>
> *That* should definitely be permitted... anything else is an utter bug.
>

Sadly,
kyle@ihatethathostname ~ $ cat foo.c
#include <stdio.h>
int main(void) {
printf("");
return 0;
}
kyle@ihatethathostname ~ $ gcc -O2 -Wall -o foo foo.c
foo.c: In function â??mainâ??:
foo.c:3: warning: zero-length printf format string

gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/