From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5010 invoked by alias); 8 Mar 2015 21:22:35 -0000 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 Received: (qmail 5001 invoked by uid 89); 8 Mar 2015 21:22:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.3 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: smtpbg298.qq.com Received: from smtpbg298.qq.com (HELO smtpbg298.qq.com) (184.105.67.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 08 Mar 2015 21:22:31 +0000 X-QQ-mid: esmtp22t1425849742t462t10699 Received: from ShengShiZhuChengdeMacBook-Pro.l (unknown [120.52.69.157]) by esmtp4.qq.com (ESMTP) with id ; Mon, 09 Mar 2015 05:22:21 +0800 (CST) X-QQ-SSF: 01000000000000F0F5300200000000G X-QQ-FEAT: 8haHhkuofmMRH5AglotnASaJnc4sSvP2f90c1zDgIIMGRe7rlNaX/jFJzPQVg Xs92lBKAiplNZUMXeVzcArgPzWfqbTVF5kLaVgCwqXIQ7pqG3x2o7/Mbwxeb1R0zH220o9Z /ibiNufulIcMLXc/7bVUIEBeJ5vEmliCjvDTYBfR8iIm3++of7iuWsMjtRNv7177nv48law 1DB5L3SncllQ4yhJ9PtT2 X-QQ-GoodBg: 0 Message-ID: <54FCBF6B.1010804@qq.com> Date: Sun, 08 Mar 2015 21:22:00 -0000 From: Chen Gang <762976180@qq.com> User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Chen Gang , 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 References: <53B1FD76.7030500@gmail.com> <1444359.20hJbUDvYc@vapier> <20150308072453.GV12857@vapier> In-Reply-To: <20150308072453.GV12857@vapier> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-QQ-SENDSIZE: 520 X-QQ-FName: 037C672B1E5E46A7AE8A8C9FED3CA682 X-QQ-LocalIP: 58.250.134.100 X-SW-Source: 2015-03/txt/msg00204.txt.bz2 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 > 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 > + > + * interp.c (microblaze_extract_unsigned_integer): Change %ld to %zu. > + > 2015-02-20 Mike Frysinger > > * 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