From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15644 invoked by alias); 4 Mar 2010 02:35:55 -0000 Received: (qmail 15612 invoked by uid 22791); 4 Mar 2010 02:35:54 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 02:35:51 +0000 Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id o242ZlJg016927 for ; Thu, 4 Mar 2010 02:35:47 GMT Received: from wya21 (wya21.prod.google.com [10.241.225.21]) by kpbe18.cbf.corp.google.com with ESMTP id o242Zj42007009 for ; Wed, 3 Mar 2010 18:35:46 -0800 Received: by wya21 with SMTP id 21so1096697wya.5 for ; Wed, 03 Mar 2010 18:35:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.93.17 with SMTP id k17mr443370wef.31.1267670144881; Wed, 03 Mar 2010 18:35:44 -0800 (PST) In-Reply-To: <201003040047.17716.pedro@codesourcery.com> References: <201003040047.17716.pedro@codesourcery.com> Date: Thu, 04 Mar 2010 02:35:00 -0000 Message-ID: Subject: Re: FYI: fix PR 11345 From: Doug Evans To: Pedro Alves Cc: gdb-patches@sourceware.org, tromey@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00147.txt.bz2 On Wed, Mar 3, 2010 at 4:47 PM, Pedro Alves wrote: > On Wednesday 03 March 2010 18:04:44, Tom Tromey wrote: >> - =A0 =A0/* Print the portion of the format string after the last argume= nt. =A0*/ >> - =A0 =A0puts_filtered (last_arg); >> + =A0 =A0/* Print the portion of the format string after the last argume= nt. >> + =A0 =A0 =A0 Note that this will not include any ordinary %-specs, but = it >> + =A0 =A0 =A0 might include "%%". =A0That is why we use printf_filtered = and not >> + =A0 =A0 =A0 puts_filtered here. =A0*/ >> + =A0 =A0printf_filtered (last_arg); > > This causes: > > make[1]: Leaving directory `/home/pedro/gdb/baseline/build/gdb' > gcc -g3 -O0 =A0 -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gd= b/config -DLOCALEDIR=3D"\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../.= ./src/gdb/../include/opcode -I../../src/gdb/../readline/.. -I../bfd -I../..= /src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gd= b/../libdecnumber =A0-I../../src/gdb/gnulib -Ignulib =A0-DMI_OUT=3D1 -DTUI= =3D1 =A0 `echo " -Wall -Wdeclaration-after-statement -Wpointer-arith -Wform= at-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-functio= n -Wno-switch -Wno-char-subscripts " | sed "s/ -Wformat-nonliteral / /g"` \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-Werror -c -o printcmd.o -MT printcmd.o -M= MD -MP -MF .deps/printcmd.Tpo ../../src/gdb/printcmd.c > cc1: warnings being treated as errors > ../../src/gdb/printcmd.c: In function 'printf_command': > ../../src/gdb/printcmd.c:2649: error: format not a string literal and no = format arguments > make: *** [printcmd.o] Error 1 > > Guess the original bug needs fixing in a different way. =A0:-/ I'd be ok with just adding a dummy format arg (and a comment explaining why it's there of course).