From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10444 invoked by alias); 30 Jun 2003 15:06:55 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10437 invoked from network); 30 Jun 2003 15:06:54 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 30 Jun 2003 15:06:54 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 5EBAD2B5F; Mon, 30 Jun 2003 11:06:48 -0400 (EDT) Message-ID: <3F005208.9080704@redhat.com> Date: Mon, 30 Jun 2003 15:47:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andreas Jaeger Cc: gdb@sources.redhat.com Subject: Re: Question about warning in gdb/remote.c References: Content-Type: multipart/mixed; boundary="------------070605020902010801080706" X-SW-Source: 2003-06/txt/msg00551.txt.bz2 This is a multi-part message in MIME format. --------------070605020902010801080706 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 442 > compiling gdb I get this warning: > /cvs/src-gdb/src/gdb/remote.c:3290: warning: too many arguments for format > > What is supposed to happen here? The line is: > error ("Remote register badly formatted: %s\nhere:", buf, p); gcc -Werror -Wformat is ment to not build (but the gcc I used did ... :-?). > Should a %s added for p at the end - or should p get removed? It should print `p'. I checked in the attached. thanks! Andrew --------------070605020902010801080706 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 595 2003-06-30 Andrew Cagney * remote.c (remote_async_wait): Fix -Wformat problem. Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.108 diff -u -r1.108 remote.c --- remote.c 29 Jun 2003 21:17:22 -0000 1.108 +++ remote.c 30 Jun 2003 15:02:25 -0000 @@ -3287,7 +3287,8 @@ } if (*p++ != ';') - error ("Remote register badly formatted: %s\nhere:", buf, p); + error ("Remote register badly formatted: %s\nhere: %s", + buf, p); } } /* fall through */ --------------070605020902010801080706--