From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24511 invoked by alias); 18 Feb 2015 16:21:29 -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 24491 invoked by uid 89); 18 Feb 2015 16:21:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: bin-vsp-out-05.atm.binero.net Received: from vsp-unauthed01.binero.net (HELO bin-vsp-out-05.atm.binero.net) (195.74.38.225) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 Feb 2015 16:21:27 +0000 X-Halon-ID: 3faf7b8e-b78a-11e4-a613-005056916f53 Authorized-sender: jiri@gaisler.se Received: from [192.168.1.20] (unknown [78.68.173.120]) by bin-vsp-out-05.atm.binero.net (Halon Mail Gateway) with ESMTPA for ; Wed, 18 Feb 2015 17:21:52 +0100 (CET) Message-ID: <54E4BBFF.1030307@gaisler.se> Date: Wed, 18 Feb 2015 16:21:00 -0000 From: Jiri Gaisler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH 13/23] sim/erc32: Fix a few compiler warnings References: <1424159099-5148-1-git-send-email-jiri@gaisler.se> <1424159099-5148-14-git-send-email-jiri@gaisler.se> <20150217110759.GH544@vapier> In-Reply-To: <20150217110759.GH544@vapier> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Jh1NWasx57ucku9ICvmVW0mGl9rj9Ettf" X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00485.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Jh1NWasx57ucku9ICvmVW0mGl9rj9Ettf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 991 On 02/17/2015 12:07 PM, Mike Frysinger wrote: > On 17 Feb 2015 08:44, Jiri Gaisler wrote: >> Minor edits to remove compiler warnings. >=20 > if you're really interested in doing this, you could add SIM_AC_OPTION_WA= RNINGS=20 > to the erc32/configure.ac script ... >=20 >> --- a/sim/erc32/interf.c >> +++ b/sim/erc32/interf.c >> @@ -509,7 +509,7 @@ sim_do_command(sd, cmd) >> SIM_DESC sd; >> const char *cmd; >> { >> - exec_cmd(&sregs, cmd); >> + exec_cmd(&sregs, (char *) cmd); >> } >=20 > shouldn't exec_cmd be changed to take a const char * instead ? looks to = me like=20 > it treats it as constant ... it does a strdup(cmd) and only operates on t= he=20 > result. I am passing cmd to strok() at one place, so const char cannot be used. >=20 > looking further, seems like it this func really should use buildargv/free= argv=20 > rather than tokenize things itself ? > -mike >=20 I will keep this on my soon-todo list. Please bare with it this time ... Jiri. --Jh1NWasx57ucku9ICvmVW0mGl9rj9Ettf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 884 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJU5Lv/AAoJEIAIwBKmO2+bdFkP/3XO7Gyky5aCK/4nv7ky0qQe Kq/y6iH+wa0KJWdV/LQEYx10o1BTDDi9V5BxgPasdYywt070ApaREYm+7I6qk+7N /JYXRiiYQSAoIuU3qY8ytpPmRdFS+1eh4dToLPJCXYHkdL8uj1o5Kgi9HnKwxsMD dhn8NvqT+sUoBmvSeN75gdM/V6ij2hokLUwq6YMbvgDC/CWuLj0coh2DVZXFkDqV UYuj+3bkiraxuEhXTpgD6lsi7hJZAsc+v6WuznOwTUNqsV4upPS9JytDzcYwyCZl Wr/8NJeTpxmzDlDEi1PsF6kCtQuqSyTens4ADukAY+Ea9dZ03AjSQ8+/7dlSQAMS wjuS7CoLSN4un1kfnXawwSFioxLi6ifUkpH9r+seERzX/HC8/HoiVRG49DP+efxE WpNORHuHQN511quzkn0xbmaahWIvCuQlZ58066pyxa4Q6yYcDMOyg9D2KNpFq9PJ u4UaohCEA+eHdS5VC/DOgZyTeoPftlFOPQROaYClGeqayw+Hsip1+KKSRFCMDuhZ h2aXn/ugSixFBpV62tihvV9/y2jxwsieM/NzGzOh3Q+NRrqA//55qmaJ3CKtwVT7 Nhy4KJK4Q5kRppwBBdJjA/Hti86+7NwCOlAdwjR5bwj+CYfqP018ncRUbkdLBXwp wCvm2bx6xjL+/EMJDXy/ =pdKL -----END PGP SIGNATURE----- --Jh1NWasx57ucku9ICvmVW0mGl9rj9Ettf--