Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: gnusrc/gnu/libexec/uucp



In article <20020530054617.3A1D8B004%cvs.netbsd.org@localhost>,
Jason R Thorpe <thorpej%netbsd.org@localhost> wrote:
>
>Module Name:   gnusrc
>Committed By:  thorpej
>Date:          Thu May 30 05:46:17 UTC 2002
>
>Modified Files:
>       gnusrc/gnu/libexec/uucp: Makefile.inc
>
>Log Message:
>Add -Wno-format-zero-length to CWARNFLAGS; ulog() is a printf-like
>function for which "" is a perfectly reasonable argument.

Well, I've been watching this format-zero-length thingy for a while,
and it occured to me that we are going the wrong way about this.

It really should not be a compiler flag, but an attribute. What
happens if you turn -Wno-format-zero-length on, and then you
have a function that does not allow zero format and you want to
check it?

I suggest something:

        __attribute__((__format__(__printf__,m,n[,
            __nullformat__[,__emptyformat__]])));

to show that a function allows null and/or empty format strings.

christos



Home | Main Index | Thread Index | Old Index