From patchwork Wed Sep 14 12:19:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jan-Benedict Glaw X-Patchwork-Id: 1677827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MSKCK5Zbbz1ynm for ; Wed, 14 Sep 2022 22:19:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 950E638582A4 for ; Wed, 14 Sep 2022 12:19:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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?= 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-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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" On Thu, 2022-09-01 12:05:23 +0200, Martin Liška wrote: > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > I've also built all cross compilers. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * 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) > > for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) > { > - mips_dbx_regno[i] = IGNORED_DWARF_REGNUM; > if (GP_REG_P (i) || FP_REG_P (i) || ALL_COP_REG_P (i)) > mips_dwarf_regno[i] = i; > else > mips_dwarf_regno[i] = INVALID_REGNUM; > } > > - start = GP_DBX_FIRST - GP_REG_FIRST; > - for (i = GP_REG_FIRST; i <= GP_REG_LAST; i++) > - mips_dbx_regno[i] = i + start; > - > - start = FP_DBX_FIRST - FP_REG_FIRST; > - for (i = FP_REG_FIRST; i <= FP_REG_LAST; i++) > - mips_dbx_regno[i] = i + start; > - > /* Accumulator debug registers use big-endian ordering. */ > - mips_dbx_regno[HI_REGNUM] = MD_DBX_FIRST + 0; > - mips_dbx_regno[LO_REGNUM] = MD_DBX_FIRST + 1; > mips_dwarf_regno[HI_REGNUM] = MD_REG_FIRST + 0; > mips_dwarf_regno[LO_REGNUM] = MD_REG_FIRST + 1; > for (i = DSP_ACC_REG_FIRST; i <= DSP_ACC_REG_LAST; i += 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_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -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../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o mips.o -MT mips.o -MMD -MP -MF ./.deps/mips.TPo ../../gcc/gcc/config/mips/mips.cc ../../gcc/gcc/config/mips/mips.cc: In function 'void mips_option_override()': ../../gcc/gcc/config/mips/mips.cc:20021:10: error: unused variable 'start' [-Werror=unused-variable] 20021 | int i, start, regno, mode; | ^~~~~ 2022-09-14 Jan-Benedict Glaw gcc/ * config/mips/mips.cc (mips_option_override): Drop unused variable. Committed as obvious. MfG, JBG 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; if (OPTION_SET_P (mips_isa_option)) mips_isa_option_info = &mips_cpu_info_table[mips_isa_option];