Date: Wed, 10 Jul 2002 16:19:10 -0700 From: Peter Wemm <peter@wemm.org> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Dag-Erling Smorgrav <des@ofug.org>, Giorgos Keramidas <keramida@FreeBSD.ORG>, current@FreeBSD.ORG Subject: Re: sparc64 tinderbox failure Message-ID: <20020710231910.484373808@overcee.wemm.org> In-Reply-To: <200207102122.g6ALMCi1004528@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote: > > : > :Giorgos Keramidas <keramida@FreeBSD.org> writes: > :> How does this look for fixing this warning? > : > :No, gcc should accept a NULL format string for err(3). It looks like > :__printf0like is broken. > : > :DES > :-- > :Dag-Erling Smorgrav - des@ofug.org > > Oops. I've already starting changing the calls to err(). Please do not. gcc is just a tool. If it emits a warning on some arches because gcc doesn't understand how our libraries work, then we should disable the gcc checking for those arches on those functions. ie: remove the __printf0like completely for #ifdef sparc64 for err() etc. eg: --- cdefs.h 2002/07/08 16:43:35 1.56 +++ cdefs.h 2002/07/10 23:18:10 @@ -174,9 +174,9 @@ __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) #endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ -#if __FreeBSD_cc_version >= 300001 +#if __FreeBSD_cc_version >= 300001 && !defined(__sparc64__) #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) #else #define __printf0like(fmtarg, firstvararg) This is much much less disruptive than slashing through userland and "fixing" something that is already perfectly correct and legal. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020710231910.484373808>