From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30661 invoked by alias); 27 Aug 2003 04:25:53 -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 30654 invoked from network); 27 Aug 2003 04:25:51 -0000 Received: from unknown (HELO localhost.redhat.com) (65.49.2.227) by sources.redhat.com with SMTP; 27 Aug 2003 04:25:51 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D4AB72B7F; Wed, 27 Aug 2003 00:25:39 -0400 (EDT) Message-ID: <3F4C32C3.7020504@redhat.com> Date: Wed, 27 Aug 2003 04:25:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Carlton Cc: Randolph Chung , gdb-patches@sources.redhat.com Subject: Re: [patch/minor] fix compile warning in linux-proc.c References: <20030821051149.GB21328@tausq.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00470.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: David, feel free to check it in. A comment mentioning that this should use a generic (and not yet existing) local_address_string() method would be useful. The casts don't phase me. The conflicting "%#10lx" and "%#18lx" do but again not desperatly. That local_address_string custom method. Andrew > 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?