From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22096 invoked by alias); 25 Aug 2003 16:48:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22085 invoked from network); 25 Aug 2003 16:48:56 -0000 Received: from unknown (HELO hawaii.kealia.com) (209.3.10.89) by sources.redhat.com with SMTP; 25 Aug 2003 16:48:56 -0000 Received: by hawaii.kealia.com (Postfix, from userid 2049) id 7B5ABBFF5; Mon, 25 Aug 2003 09:48:56 -0700 (PDT) To: Randolph Chung Subject: Re: [patch/minor] fix compile warning in linux-proc.c Cc: gdb-patches@sources.redhat.com, Andrew Cagney References: <20030821051149.GB21328@tausq.org> From: David Carlton Date: Mon, 25 Aug 2003 16:48:00 -0000 In-Reply-To: <20030821051149.GB21328@tausq.org> (Randolph Chung's message of "Wed, 20 Aug 2003 22:11:49 -0700") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-08/txt/msg00434.txt.bz2 On Wed, 20 Aug 2003 22:11:49 -0700, Randolph Chung said: > While trying to get hppa-linux building with -Werror, I came across one > warning in linux-proc.c that's triggered by -Wformat-nonliteral. This > patch fixes it if anybody cares :) I'm seeing this on i686-pc-linux-gnu, too. The patch looks fine to me (though I'm not in a position to approve it); if I were in a hyper-refactoring mode, I suppose I'd be tempted to create new functions print_header_format_32, print_data_fmt_32, print_header_format_64, print_data_fmt_64 defined along these lines: static void print_data_fmt_64 (unsigned long addr, unsigned long endaddr, int size, unsigned int offset, const char *filename) { printf_filtered (" %#181x %#181x %#10x %#10x %7s\n", addr, endaddr, size, offset, filename); } but I don't think it's really urgent to do so. Hmm; maybe we really should do that, at least for the data strings, because it gets rid of casts? Andrew, what do you think? David Carlton carlton@kealia.com