From owner-cvs-all Thu Jul 11 12:44:12 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9F7337B401; Thu, 11 Jul 2002 12:43:59 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41F2B43E52; Thu, 11 Jul 2002 12:43:58 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id FAA16029; Fri, 12 Jul 2002 05:43:46 +1000 Date: Fri, 12 Jul 2002 05:47:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Peter Wemm Cc: Sheldon Hearn , , Subject: Re: cvs commit: src/bin/rm Makefile src/bin/cp Makefile src/bin/chmod Makefile In-Reply-To: <20020711152938.3CC4A380A@overcee.wemm.org> Message-ID: <20020712053301.R25129-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 11 Jul 2002, Peter Wemm wrote: > Sheldon Hearn wrote: > > sheldonh 2002/07/11 01:45:39 PDT > > > > Modified files: > > bin/rm Makefile > > bin/cp Makefile > > bin/chmod Makefile > > Log: > > Set WFORMAT=0, because our compiler currently complains about NULL > > arg 2 to err() and friends, and warnings are promoted to errors. > > Umm, this should already be fixed, see the sys/cdefs.h v1.57 commit. > I think these should be backed out. None of these commits should have even been dreamt of. They just break the warning. The warning was really about an uninitialized variable in the __printf0like format checking support in rev.1.3 of c-format.c. The variable was initialized from stack garbage. This resulted in the warning being turned off randomly. For some reason it was usually turned off on i386's and usually left on for alphas. Note that the bug affected more than __printf0like. There was (usually) no warning for printf(NULL) on i386's. %%% Index: c-format.c =================================================================== RCS file: /home/ncvs/src/contrib/gcc/c-format.c,v retrieving revision 1.4 diff -u -2 -r1.4 c-format.c --- c-format.c 26 May 2002 16:04:37 -0000 1.4 +++ c-format.c 11 Jul 2002 17:01:09 -0000 @@ -86,5 +86,4 @@ unsigned HOST_WIDE_INT format_num; /* number of format argument */ unsigned HOST_WIDE_INT first_arg_num; /* number of first arg (zero for varargs) */ - int null_format_ok; /* TRUE if the format string may be NULL */ } function_format_info; @@ -941,12 +940,4 @@ static void check_format_types PARAMS ((int *, format_wanted_type *)); - -inline static int get_null_fmt_ok (fmttype) - enum format_type fmttype; -{ - return format_types[(int)fmttype].null_format_ok; -} - - /* Decode a format type from a string, returning the type, or format_type_error if not valid, in which case the caller should print an @@ -1507,5 +1498,6 @@ that case, or maybe add a function pointer to be called at the end instead of hardcoding check_format_info_main. */ - if (!info->null_format_ok) status_warning (status, "null format string"); + if (!format_types[info->format_type].null_format_ok) + status_warning (status, "null format string"); /* Skip to first argument to check, so we can see if this format %%% Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message