Matthew Dillon wrote:
> :
> :Giorgos Keramidas <[EMAIL PROTECTED]> 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 - [EMAIL PROTECTED]
>     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.


--- 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)))
 /* 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)))
 #define        __printf0like(fmtarg, firstvararg)

This is much much less disruptive than slashing through userland and
"fixing" something that is already perfectly correct and legal.

"All of this is for nothing if we don't go to the stars" - JMS/B5

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to