tech-userlevel archive

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

Re: Adding missing __printflike attributions



On Sun, Mar 04, 2012 at 10:06:15PM +0200, Alan Barrett wrote:
 > >the attached patch addes the missing __printflike attribution for cases
 > >where a function calls a va_list variant like vprintf and passes an
 > >argument as format string down. The benefit of the attribution is
 > >correct format string checking. I'm committed all real fixes outside
 > >src/external, src/crypto/external and src/tests already.
 > 
 > The change seems generally reasonable to me.
 > 
 > >-   ATF_CHECK(load(NULL, false, "") == ENOENT);
 > >+   ATF_CHECK(load(NULL, false, "%s", "") == ENOENT);
 > 
 > An empty format string is perfectly valid; there
 > should be no need to change printflike_function("")
 > to printflike_function("%s", ""). If this change is
 > to appease a gcc warning, then I suggest adding
 > -Wno-format-zero-length to CFLAGS in bsd.sys.mk

Yes, let's just do that. It is a stupid warning...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index