Message-ID: <007601c20630$0d876890$0102a8c0@acceleron> From: "Andrew Cottrell" To: Subject: GCC 3.1 & CVS LIC src\debug\edebug\unassmbl.c patch (warning) Date: Tue, 28 May 2002 20:03:57 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Reply-To: djgpp-workers AT delorie DOT com All, Below is a patch that I've used in order to remove a warning when building CVS LIBC with gcc 3.1. Any problems with this? Andrew --- src\debug\edebug\orig\unassmbl.c 2002-05-28 20:02:58.000000000 +1000 +++ src\debug\edebug\unassmbl.c 2002-05-28 19:48:16.000000000 +1000 @@ -1,3 +1,4 @@ +/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ @@ -16,6 +17,7 @@ #include #include +#include #include "ed.h" #include "unassmbl.h" @@ -340,9 +342,12 @@ static int sib(void) /*------------------------------------------------------------------------*/ static void uprintf(const char *s, ...) { - const char **a = &s; - vsprintf(ubufp, s, a+1); + va_list args; + + va_start(args, s); + vsprintf(ubufp, s, args); while (*ubufp) ubufp++; + va_end(args); } static void uputchar(char c)