From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lug-owl.de (lug-owl.de [IPv6:2a03:4000:10:469::]) by sourceware.org (Postfix) with ESMTPS id 6339638582A1 for ; Wed, 14 Sep 2022 12:19:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6339638582A1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id E0D8542039; Wed, 14 Sep 2022 14:19:21 +0200 (CEST) Date: Wed, 14 Sep 2022 14:19:21 +0200 From: Jan-Benedict Glaw To: Martin =?utf-8?B?TGnFoWth?= Cc: gcc-patches@gcc.gnu.org Subject: [COMMITTED] Fix unused variable warning (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality) Message-ID: <20220914121921.j46kmn2btdwmj3sc@lug-owl.de> References: <10a94ccc-e01b-b98a-0fcb-cd661c10c315@suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3zlptapsmxn4ngb2" Content-Disposition: inline In-Reply-To: <10a94ccc-e01b-b98a-0fcb-cd661c10c315@suse.cz> X-Operating-System: Linux chamaeleon 5.14.0-0.bpo.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --3zlptapsmxn4ngb2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 2022-09-01 12:05:23 +0200, Martin Li=C5=A1ka wrote: > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >=20 > I've also built all cross compilers. >=20 > Ready to be installed? > Thanks, > Martin >=20 > gcc/ChangeLog: >=20 > * Makefile.in: Remove -gstabs option support, DBX-related > macros and DBX debugging info support. [...] > * config/mips/mips.cc (mips_output_filename): Likewise. > (mips_option_override): Likewise. [...] > diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc > index e81a245dcf4..47724950c3e 100644 > --- a/gcc/config/mips/mips.cc > +++ b/gcc/config/mips/mips.cc [...] > @@ -20505,24 +20500,13 @@ mips_option_override (void) > =20 > for (i =3D 0; i < FIRST_PSEUDO_REGISTER; i++) > { > - mips_dbx_regno[i] =3D IGNORED_DWARF_REGNUM; > if (GP_REG_P (i) || FP_REG_P (i) || ALL_COP_REG_P (i)) > mips_dwarf_regno[i] =3D i; > else > mips_dwarf_regno[i] =3D INVALID_REGNUM; > } > =20 > - start =3D GP_DBX_FIRST - GP_REG_FIRST; > - for (i =3D GP_REG_FIRST; i <=3D GP_REG_LAST; i++) > - mips_dbx_regno[i] =3D i + start; > - > - start =3D FP_DBX_FIRST - FP_REG_FIRST; > - for (i =3D FP_REG_FIRST; i <=3D FP_REG_LAST; i++) > - mips_dbx_regno[i] =3D i + start; > - > /* Accumulator debug registers use big-endian ordering. */ > - mips_dbx_regno[HI_REGNUM] =3D MD_DBX_FIRST + 0; > - mips_dbx_regno[LO_REGNUM] =3D MD_DBX_FIRST + 1; > mips_dwarf_regno[HI_REGNUM] =3D MD_REG_FIRST + 0; > mips_dwarf_regno[LO_REGNUM] =3D MD_REG_FIRST + 1; > for (i =3D DSP_ACC_REG_FIRST; i <=3D DSP_ACC_REG_LAST; i +=3D 2) This leaves the `start` variable unused, resulting in a new warning. Fixed (committed as obvious) by this: /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIR= ECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -= W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribu= te -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-= overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc= /gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp= /include -I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber -I../.= =2E/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbac= ktrace -o mips.o -MT mips.o -MMD -MP -MF ./.deps/mips.TPo ../../gcc/gcc/c= onfig/mips/mips.cc =2E./../gcc/gcc/config/mips/mips.cc: In function 'void mips_option_override= ()': =2E./../gcc/gcc/config/mips/mips.cc:20021:10: error: unused variable 'start= ' [-Werror=3Dunused-variable] 20021 | int i, start, regno, mode; | ^~~~~ 2022-09-14 Jan-Benedict Glaw gcc/ * config/mips/mips.cc (mips_option_override): Drop unused variable. diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 47724950c3e..387376b3df8 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -20018,7 +20018,7 @@ mips_set_tune (const struct mips_cpu_info *info) static void mips_option_override (void) { - int i, start, regno, mode; + int i, regno, mode; =20 if (OPTION_SET_P (mips_isa_option)) mips_isa_option_info =3D &mips_cpu_info_table[mips_isa_option]; Committed as obvious. MfG, JBG --=20 --3zlptapsmxn4ngb2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCYyHGxwAKCRAdvV51g5nh uwA6AJ4zk12TB+/vnH+Ur6dW0WmxM6QfRACfRxQMwvQFhGqOCVM6QsLCEjebgg8= =00an -----END PGP SIGNATURE----- --3zlptapsmxn4ngb2--