From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 20956 invoked from network); 10 Jan 2003 16:13:20 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 209.249.29.67 with SMTP; 10 Jan 2003 16:13:20 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18X3f8-0004dw-00 for ; Fri, 10 Jan 2003 12:13:46 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18X1mm-0002B1-00 for ; Fri, 10 Jan 2003 11:13:32 -0500 Date: Fri, 10 Jan 2003 16:13:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFC] trying to kill a warning in hpread.c (from call to complaint) Message-ID: <20030110161332.GA8350@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20030110142639.GC30359@gnat.com> <20030110143454.GA3492@nevyn.them.org> <3E1EF005.5060906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E1EF005.5060906@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-01/txt/msg00406.txt.bz2 On Fri, Jan 10, 2003 at 11:08:37AM -0500, Andrew Cagney wrote: > > >> complaint (&symfile_complaints, "bad string table offset in symbol > >> %d", \ > >> (char *) symnum); \ > >> *NAMEP = ""; \ > >> } \ > >> else \ > >> *NAMEP = (SYM)->dsfile.name + VT (OBJFILE) > >> > >>I think that the warning comes from the call to complaint where the > >>format string contains "%d", but the next parameter is casted to a > >>"char *". > >> > >>Is the cast to "char *" necessary? Can/Should I remove it? > > > > > >Looks like a typo in Kevin's complaint patch. > > Nope. The original code was broken: > > complain (&string_table_offset_complaint, (char *) symnum); > > (complaint -> complaints finds another victim / bug). Agh! CVS logs foil me again! No offense intended to Kevin. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer