Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Chen Gang <762976180@qq.com>
To: Chen Gang <gang.chen.5i5j@gmail.com>,
	gdb-patches@sourceware.org,  eager@eagercon.com
Subject: Re: [PATCH] sim/microblaze/interp.c: Use long int format instead of int to avoid compiling warnings
Date: Sun, 08 Mar 2015 21:22:00 -0000	[thread overview]
Message-ID: <54FCBF6B.1010804@qq.com> (raw)
In-Reply-To: <20150308072453.GV12857@vapier>


On 3/8/15 15:24, Mike Frysinger wrote:
> 
> i've committed this now
> -mike
> 

Thank you for your work.

I shall try to make another patches for binutils/gdb within this month.
(before 2015-03-15, I am mainly focus on Linux kernel and qemu, after
2015-03-15, I am mainly focus on gcc/binutils).

Thanks.

> From 3e95021c775db2c483e87033ebef3d42ff99c7e0 Mon Sep 17 00:00:00 2001
> From: Mike Frysinger <vapier@gentoo.org>
> Date: Sun, 8 Mar 2015 03:24:03 -0400
> Subject: [PATCH] sim: microblaze: fix printf string
> 
> Since sizeof returns a size_t, use %zu to display it.
> ---
>  sim/microblaze/ChangeLog | 4 ++++
>  sim/microblaze/interp.c  | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
> index 0a068ff..e34a21d 100644
> --- a/sim/microblaze/ChangeLog
> +++ b/sim/microblaze/ChangeLog
> @@ -1,3 +1,7 @@
> +2015-03-08  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* interp.c (microblaze_extract_unsigned_integer): Change %ld to %zu.
> +
>  2015-02-20  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* interp.c: Delete sysdep.h and netinet/in.h includes.
> diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
> index 64850ef..ac2adb8 100644
> --- a/sim/microblaze/interp.c
> +++ b/sim/microblaze/interp.c
> @@ -51,7 +51,7 @@ microblaze_extract_unsigned_integer (unsigned char *addr, int len)
>  
>    if (len > (int) sizeof (unsigned long))
>      printf ("That operation is not available on integers of more than "
> -	    "%ld bytes.", sizeof (unsigned long));
> +	    "%zu bytes.", sizeof (unsigned long));
>  
>    /* Start at the most significant end of the integer, and work towards
>       the least significant.  */
> 

-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed


      reply	other threads:[~2015-03-08 21:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01  0:15 Chen Gang
2014-07-01  0:43 ` Michael Eager
2014-07-01  1:08   ` Chen Gang
2014-07-01  1:11     ` Michael Eager
2014-08-02 17:21 ` Mike Frysinger
2015-03-08  7:24   ` Mike Frysinger
2015-03-08 21:22     ` Chen Gang [this message]

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=54FCBF6B.1010804@qq.com \
    --to=762976180@qq.com \
    --cc=eager@eagercon.com \
    --cc=gang.chen.5i5j@gmail.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