From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11595 invoked by alias); 23 Apr 2002 06:11:45 -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 11561 invoked from network); 23 Apr 2002 06:11:41 -0000 Received: from unknown (HELO is.elta.co.il) (199.203.121.2) by sources.redhat.com with SMTP; 23 Apr 2002 06:11:41 -0000 Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id KAA23794; Tue, 23 Apr 2002 10:10:17 +0300 (IDT) Date: Mon, 22 Apr 2002 23:11:00 -0000 From: Eli Zaretskii X-Sender: eliz@is To: Jason R Thorpe cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Trivial printf format warning fixes In-Reply-To: <20020422200013.A18016@dr-evil.shagadelic.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-04/txt/msg00828.txt.bz2 On Mon, 22 Apr 2002, Jason R Thorpe wrote: > error ("Syntax error at prompt position %d", > - promptp - local_prompt); > + (int) (promptp - local_prompt)); I think the result of subtracting two pointers can be wider than an int, can't it? If so, casting to an int is not right, and the format should be changed to %ld. (Yes, this is nitpicking, but if we are to fix this warning, might as well do it right ;-)