From owner-freebsd-current Wed Jul 10 16:19:13 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCEE337B400; Wed, 10 Jul 2002 16:19:10 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DFDB43E31; Wed, 10 Jul 2002 16:19:10 -0700 (PDT) (envelope-from peter@wemm.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id 334712A7D6; Wed, 10 Jul 2002 16:19:10 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id DA2434C211; Wed, 10 Jul 2002 16:19:09 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 484373808; Wed, 10 Jul 2002 16:19:10 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Matthew Dillon Cc: Dag-Erling Smorgrav , Giorgos Keramidas , current@FreeBSD.ORG Subject: Re: sparc64 tinderbox failure In-Reply-To: <200207102122.g6ALMCi1004528@apollo.backplane.com> Date: Wed, 10 Jul 2002 16:19:10 -0700 From: Peter Wemm Message-Id: <20020710231910.484373808@overcee.wemm.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matthew Dillon wrote: > > : > :Giorgos Keramidas 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