From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32183 invoked by alias); 17 Feb 2015 11:08:04 -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 32171 invoked by uid 89); 17 Feb 2015 11:08:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 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; Tue, 17 Feb 2015 11:08:02 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 2AB1A340828; Tue, 17 Feb 2015 11:08:00 +0000 (UTC) Date: Tue, 17 Feb 2015 11:08:00 -0000 From: Mike Frysinger To: Jiri Gaisler Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 13/23] sim/erc32: Fix a few compiler warnings Message-ID: <20150217110759.GH544@vapier> Mail-Followup-To: Jiri Gaisler , gdb-patches@sourceware.org References: <1424159099-5148-1-git-send-email-jiri@gaisler.se> <1424159099-5148-14-git-send-email-jiri@gaisler.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPDwMsyfds7q4mrK" Content-Disposition: inline In-Reply-To: <1424159099-5148-14-git-send-email-jiri@gaisler.se> X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00429.txt.bz2 --ZPDwMsyfds7q4mrK Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 738 On 17 Feb 2015 08:44, Jiri Gaisler wrote: > Minor edits to remove compiler warnings. if you're really interested in doing this, you could add SIM_AC_OPTION_WARN= INGS=20 to the erc32/configure.ac script ... > --- 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); > } 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 the= =20 result. looking further, seems like it this func really should use buildargv/freear= gv=20 rather than tokenize things itself ? -mike --ZPDwMsyfds7q4mrK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU4yEPAAoJEEFjO5/oN/WB9Z4QAIc4skxBJ0/iYmFJ2qaakI5k izGnvMugClY2xUUJGn3EOfmdXOqK2Pyxd33JXUuqCKHMlVATTPGiAJCrI4QFFDcB jiZ30G7sfaefiDvdQaV6VdhLKbvwO4KhkXA80/B3dKIs9RS49JQUOznPEv/PU0fh Z2tf6VtacKIe2UNzedlDuDk8Ciqs5q4dxDY/EZe5BEyn6TnErSNwcRQ2v7VlXXNj dhWwRPNv4O+86wyPNbTnLFjw0YocYa66W+lFHRfcX13mI3aSLXb6OXVBuSaxZlGq xiK4fPoqqCwMuPS03Jr3MabiALpiBbin6QBH2vZC9lGk4bG5FJf+dCrSE4c0QkzD y+onqSwS9UyX3LrRh3BjdE3u9FPJFs5PoGELDlUXUOTEgZniyHfT5za4BlWaUVdG G0Q+PhAh2rp9wbobCLF5V3nBKNmIUu6332cbWdi4VCEvjs5ygKgxI5fRf8ajTiRY eMCLjBfEJedoS9gKJ3FDaIT0nc92FajbUugO65U/dk1zTyvlWknHlthlp7sGU9cR CkOCGj2V/3m1HVTO1j/Uy/dr5UoJglXvhS+bz1/wJIyPFSenACLrYmkV6fX182hD DgENIEiDbyIKzSLSdcD+yKV4CafV1hhg2c6zXtSfJa4e75dF8xX/Ou6cTsiZh/n7 OKP48pnDCLcXIVric3hd =clrW -----END PGP SIGNATURE----- --ZPDwMsyfds7q4mrK--