Subject: Re: CVS commit: gnusrc/gnu/libexec/uucp
To: None <source-changes@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: source-changes
Date: 05/30/2002 18:02:14
In article <20020530054617.3A1D8B004@cvs.netbsd.org>,
Jason R Thorpe <thorpej@netbsd.org> 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