From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7528 invoked by alias); 27 Feb 2013 20:29:41 -0000 Received: (qmail 7418 invoked by uid 22791); 27 Feb 2013 20:29:15 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Wed, 27 Feb 2013 20:29:05 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 568E4520243; Wed, 27 Feb 2013 21:29:02 +0100 (CET) Date: Wed, 27 Feb 2013 21:25:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [patch] gdbserver/win32-low.c: Fix printf-like formatting (was Re: [patch]: Replace stryoul call to fetch address) Message-ID: <20130227202902.GB14591@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <20130227164419.GA16975@calimero.vinschen.de> <512E404E.6070504@redhat.com> <20130227183805.GA30418@calimero.vinschen.de> <512E5B26.7050104@redhat.com> <20130227194235.GB30418@calimero.vinschen.de> <20130227195013.GC30418@calimero.vinschen.de> <83obf5wlon.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <83obf5wlon.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2013-02/txt/msg00713.txt.bz2 On Feb 27 22:23, Eli Zaretskii wrote: > > Date: Wed, 27 Feb 2013 20:50:13 +0100 > > From: Corinna Vinschen > > > > @@ -1452,7 +1452,7 @@ get_child_debug_event (struct target_wai > > { > > case CREATE_THREAD_DEBUG_EVENT: > > OUTMSG2 (("gdbserver: kernel event CREATE_THREAD_DEBUG_EVENT " > > - "for pid=%d tid=%x)\n", > > + "for pid=%u tid=%x)\n", > > (unsigned) current_event.dwProcessId, > > (unsigned) current_event.dwThreadId)); > > > > @@ -1465,7 +1465,7 @@ get_child_debug_event (struct target_wai > > > > case EXIT_THREAD_DEBUG_EVENT: > > OUTMSG2 (("gdbserver: kernel event EXIT_THREAD_DEBUG_EVENT " > > - "for pid=%d tid=%x\n", > > + "for pid=%u tid=%x\n", > > (unsigned) current_event.dwProcessId, > > (unsigned) current_event.dwThreadId)); > > child_delete_thread (current_event.dwProcessId, > > I don't understand the need for any of these changes. DWORD is > already an unsigned integer type: > > typedef unsigned long DWORD; > > (this is from windef.h). So why do we need to cast it to 'unsigned'?? > What "type related warnings" did you see? If you look closely, I didn't add the unsigned casts. I just changed %d to %u or %x, matching the signedness of the value. The unsigned casts are already widely used throughout the file. Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat