From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13777 invoked by alias); 8 Mar 2015 07:24:58 -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 13765 invoked by uid 89); 8 Mar 2015 07:24:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 08 Mar 2015 07:24:56 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id E7AE5340706; Sun, 8 Mar 2015 07:24:53 +0000 (UTC) Date: Sun, 08 Mar 2015 07:24:00 -0000 From: Mike Frysinger To: Chen Gang , gdb-patches@sourceware.org Cc: eager@eagercon.com Subject: Re: [PATCH] sim/microblaze/interp.c: Use long int format instead of int to avoid compiling warnings Message-ID: <20150308072453.GV12857@vapier> Mail-Followup-To: Chen Gang , gdb-patches@sourceware.org, eager@eagercon.com References: <53B1FD76.7030500@gmail.com> <1444359.20hJbUDvYc@vapier> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="37S+gaNFgaAMSwRw" Content-Disposition: inline In-Reply-To: <1444359.20hJbUDvYc@vapier> X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00200.txt.bz2 --37S+gaNFgaAMSwRw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2009 On 02 Aug 2014 13:21, Mike Frysinger wrote: > On Tue 01 Jul 2014 08:14:46 Chen Gang wrote: >=20 > sim patches only go to gdb-patches, so don't include cgen/binutils in the= =20 > future please >=20 > > --- a/sim/microblaze/interp.c > > +++ b/sim/microblaze/interp.c > >=20 > > if (len > (int) sizeof (unsigned long)) > > printf ("That operation is not available on integers of more than " > > - "%d bytes.", sizeof (unsigned long)); > > + "%ld bytes.", sizeof (unsigned long)); >=20 > unfortunately, i don't believe this is correct. pretty sure the right an= swer=20 > is %zu as sizeof() is a size_t. i've committed this now -mike =46rom 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 =20 * 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) =20 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)); =20 /* Start at the most significant end of the integer, and work towards the least significant. */ --=20 2.3.1 --37S+gaNFgaAMSwRw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU+/lFAAoJEEFjO5/oN/WBQVwP/iUQ2siiFUPrgrQmO55NzQH9 Hy4lnalh8jJVzxwPBUrDoZzSsX/ureo0hLYPjreXw2x1zfWYiaxZHooVjL8ASTjE rYHFbsZ7EKqsHq5zhwKL5zs7UGxZhmfIvP189u9Y73c0Aj8O8TWAUpi4o3EG5JDt RY3mtWgCC89wobo+1Djh3VbFOQnCrFVtYNY7hrwlwgHgFYpPwKgrUjbhUNu9zPdt CNvZ37NE4Y/+cHsR1dYTTPKONNQjHtau7vaqrugLHPRwt8hTNkiu7wBUuq22rEFA fT8UT6uIQF9zGhwAjabDvJK2G9VA2960J/d48tCzMk6xB9LmRo8MGH7gNnb76wUn YzIFUZks/15Tdj0rBm9/GS4dpBYlvyJJ9KEr2eIMwOnsFEVkmNjiV7E21R2IHuWD H5qP7sRPlBuxByLEgfHmiczHquCz11W38FXpEBrcU0tbCZaiAfpAdL/y+XP0OUi4 Fvzqgk4GiqeUpW1gG8WjAv12l2AMewVL6ZkVJr2lY1uI+wrKwakDHeiMEZpqDeaj fhauNXiiK2pmteHK3BR4q6hQs53M+7jL0CuaYO8QIPtT5Rmb/It6O9K7U3RiC+bs YclHO1NDZ6NuzpPHwTtt9AcygydNY+6YFbSta5p+Bn/QQZBwp61xDi4TfpT2s8P1 d+JRG4PdM+BzoPeC0bAJ =zyFP -----END PGP SIGNATURE----- --37S+gaNFgaAMSwRw--