Mail Archives: djgpp-workers/2002/05/27/01:07:26
On Sun, 26 May 2002, Martin Stromberg wrote:
> > It's actually trying to help us out. The warning is about the "zero-length
> > format string" we're passing to snprintf. It's only an error, because we're
> > compiling with -Werror now.
>
> Sure it's trying to help us. But what's wrong with an empty format
> string if all we want is a zero length string?
>
> It's insane. Can anybody understand why this would be helpful?
I suggest to post the question to the GCC mailing list. They have some
weird ideas about useful warnings in some cases, so maybe this is one of
them. But it could also be a bug (e.g., GCC is trying to apply its
extended checks on printf-style functions, and fails), in which case
reporting it to the maintainers is the Right Thing.
FWIW, I agree that in this case the warning is a useless annoyance.
- Raw text -