From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 604063858D3C for ; Fri, 7 Oct 2022 08:11:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 604063858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 317831F7AB for ; Fri, 7 Oct 2022 08:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1665130300; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5W5uXLml3r4FirM2hLV3S12IZ6EErYmvwxa+3k4mPp4=; b=B6nnv/imHGRa5Qiw5QhDZxUnVumK878ESJWyqS1QqOEwv2uSK/04vHUuBW37BEbt+jSaQk /DiMFSjawHsH1C6FCZFnILaaJm4YdnOHRbVWk0LraB3c6YxMYjxRJpx/y7VtO84wALcnA4 Y3J4bJrwTqMTQQLfGX/95WfdCnEUS9g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1665130300; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5W5uXLml3r4FirM2hLV3S12IZ6EErYmvwxa+3k4mPp4=; b=AShFYr8C4/hHiw9V182mMvo9HIeJ1uwevNfckkH1cOpzELqcRpTbvHc+zLXm8FuIqH/Ie+ R+mVC8+qPtGI1wAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1972D13A9A for ; Fri, 7 Oct 2022 08:11:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UKm8BDzfP2NzbwAAMHmgww (envelope-from ) for ; Fri, 07 Oct 2022 08:11:40 +0000 Message-ID: Date: Fri, 7 Oct 2022 10:11:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH][pushed] remove dead variables To: gcc-patches@gcc.gnu.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP 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: Remove unused variables that are modified but not used. gcc/ChangeLog: * auto-profile.cc (get_inline_stack): Remove unused variable. gcc/objc/ChangeLog: * objc-gnu-runtime-abi-01.cc (generate_static_references): Remove unused variable. --- gcc/auto-profile.cc | 2 -- gcc/objc/objc-gnu-runtime-abi-01.cc | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 6533722817f..ca48404eaf1 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -388,7 +388,6 @@ get_inline_stack (location_t locus, inline_stack *stack) tree block = LOCATION_BLOCK (locus); if (block && TREE_CODE (block) == BLOCK) { - int level = 0; for (block = BLOCK_SUPERCONTEXT (block); block && (TREE_CODE (block) == BLOCK); block = BLOCK_SUPERCONTEXT (block)) @@ -401,7 +400,6 @@ get_inline_stack (location_t locus, inline_stack *stack) stack->safe_push ( std::make_pair (decl, get_combined_location (locus, decl))); locus = tmp_locus; - level++; } } stack->safe_push ( diff --git a/gcc/objc/objc-gnu-runtime-abi-01.cc b/gcc/objc/objc-gnu-runtime-abi-01.cc index 94133146d8f..e76c486927e 100644 --- a/gcc/objc/objc-gnu-runtime-abi-01.cc +++ b/gcc/objc/objc-gnu-runtime-abi-01.cc @@ -1852,7 +1852,7 @@ generate_static_references (void) tree class_name, klass, decl; tree cl_chain, in_chain, type = build_array_type (build_pointer_type (void_type_node), NULL_TREE); - int num_inst, num_class; + int num_class; char buf[BUFSIZE]; vec *decls = NULL; @@ -1861,8 +1861,8 @@ generate_static_references (void) { vec *v = NULL; - for (num_inst = 0, in_chain = TREE_PURPOSE (cl_chain); - in_chain; num_inst++, in_chain = TREE_CHAIN (in_chain)); + for (in_chain = TREE_PURPOSE (cl_chain); + in_chain; in_chain = TREE_CHAIN (in_chain)); snprintf (buf, BUFSIZE, "_OBJC_STATIC_INSTANCES_%d", num_class); decl = start_var_decl (type, buf); -- 2.37.3