Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
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)
Date: Wed, 27 Feb 2013 21:25:00 -0000	[thread overview]
Message-ID: <20130227202902.GB14591@calimero.vinschen.de> (raw)
In-Reply-To: <83obf5wlon.fsf@gnu.org>

On Feb 27 22:23, Eli Zaretskii wrote:
> > Date: Wed, 27 Feb 2013 20:50:13 +0100
> > From: Corinna Vinschen <vinschen@redhat.com>
> > 
> > @@ -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


  reply	other threads:[~2013-02-27 20:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 16:44 [patch]: Replace stryoul call to fetch address Corinna Vinschen
2013-02-27 17:20 ` Pedro Alves
2013-02-27 18:47   ` Corinna Vinschen
2013-02-27 19:40     ` Pedro Alves
2013-02-27 19:53       ` Corinna Vinschen
2013-02-27 20:03         ` [patch] gdbserver/win32-low.c: Fix printf-like formatting (was Re: [patch]: Replace stryoul call to fetch address) Corinna Vinschen
2013-02-27 21:05           ` Eli Zaretskii
2013-02-27 21:25             ` Corinna Vinschen [this message]
2013-02-27 21:30               ` Eli Zaretskii
2013-02-28  9:19                 ` Corinna Vinschen
2013-02-28 16:20                   ` Eli Zaretskii
2013-02-27 21:50           ` Pedro Alves
2013-02-28 11:01             ` Corinna Vinschen
2013-02-28  0:44         ` [patch]: Replace stryoul call to fetch address Pedro Alves
2013-02-28 10:02           ` Corinna Vinschen
2013-02-28 16:33             ` Corinna Vinschen
2013-02-28 16:48               ` Corinna Vinschen
2013-02-28 17:04                 ` Pedro Alves
2013-02-27 20:24   ` Christopher Faylor
2013-02-27 20:29     ` Christopher Faylor
2013-02-28  0:33       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130227202902.GB14591@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox