From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 746 invoked by alias); 10 Apr 2010 20:29:53 -0000 Received: (qmail 736 invoked by uid 22791); 10 Apr 2010 20:29:53 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Apr 2010 20:29:49 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 8E2EF1B41DD for ; Sat, 10 Apr 2010 20:29:47 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [patch] sim: constify sim_fpu_print_status Date: Sat, 10 Apr 2010 20:29:00 -0000 User-Agent: KMail/1.13.1 (Linux/2.6.33.2; KDE/4.4.1; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1748702.ELCT0kgOP8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201004101629.28634.vapier@gentoo.org> 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: 2010-04/txt/msg00305.txt.bz2 --nextPart1748702.ELCT0kgOP8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-length: 1009 I've committed the following patch as obvious. The local "prefix" variable= is=20 only assigned const strings, and only passed to printf() functions, so add= =20 "const" to avoid gcc warnings: common/sim-fpu.c: In function 'sim_fpu_print_status': common/sim-fpu.c:2508: warning: initialization discards qualifiers from=20 pointer target type common/sim-fpu.c:2566: warning: assignment discards qualifiers from pointer= =20 target type -mike 2010-04-10 Mike Frysinger * sim-fpu.c (sim_fpu_print_status): Add const markings to local "prefix" var. RCS file: /cvs/src/src/sim/common/sim-fpu.c,v retrieving revision 1.17 diff -u -p -r1.17 sim-fpu.c --- sim/common/sim-fpu.c 10 Apr 2010 08:26:45 -0000 1.17 +++ sim/common/sim-fpu.c 10 Apr 2010 20:25:45 -0000 @@ -2497,7 +2497,7 @@ sim_fpu_print_status (int status, void *arg) { int i =3D 1; - char *prefix =3D ""; + const char *prefix =3D ""; while (status >=3D i) { switch ((sim_fpu_status) (status & i)) --nextPart1748702.ELCT0kgOP8 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJLwN+oAAoJEEFjO5/oN/WBWyAP/jUYvddageZNTPVWpmGoxX1r 6BHixS1sNqR/f/Oy9Nhn/pGX8Wlm9WuMvNjRTzKjKWw2UC8pgDYN8riULfPFlujl 235h1RT+DJpI4RB+GHLcN43QX1zHG/PlvC5Pz7+i3mvicqXck0sQNDz6GG3ba1fw 03udBFnBaVbXwTOi+7KykcM4qPcVK3WLKxh/3rgrMA09+RotKKBFHTtx/GyoQYw7 kR1J+8WtqRg1J0jyTY+OeU0rLZHwDViSLdUtoct7LniPrPcC3NrS451pL+mz9g15 1NJjSLzcUP9XhTJdhhIj5HQmYfFgMbAv66m54zWf2LwB3Jlz1YOtOV0jLOlYcQql zSMj33YMDHq1igolzYnIMnPjZJZgI6hd8HrBB9eiUBeQdKZkwswVvh7yZvz/nUb9 MDhD2Ng//q8DcTmNOfmJ8QCwXGt2xqK+KzY2R+ms0s32Nrk7qyb2CWTqJn0T7PGz mK2l1fAoOYU4Iu9orNLvlixOJtJ9Rae7ATdE4nZZC6nlAJGIxO0yGSnXYXkBKSoU hu9jQvyM6qUINfoRyNYRPoxCqYrEcdZrroAKP8WllX07i40neL3W7AmbzXxVzIB2 2bmW65/iTZm8KAlsGl/RCpRnzOTqGCtXr6rByI8ZL1Bga9Knn8HFBx62LK42c5X9 3b5+6UUd+Xgjih1+G1fy =qa1w -----END PGP SIGNATURE----- --nextPart1748702.ELCT0kgOP8--