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 AF5D83858D37 for ; Wed, 5 Oct 2022 11:35:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AF5D83858D37 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 6E91B1F8B8; Wed, 5 Oct 2022 11:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664969724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWqavTCBrcIj9tKOpAH7Tq7IsYZOoIOHIBPY4AkRTF0=; b=mLZ6EvmtP3TrRu3Bsg/X3O6UbWiJIkuxLDx0aOUn18qgxlJ0p23Ab3WUQdzqie8kLDWRIa ben0ekqfZL3yw6C/8FBICb+V7sfhEHl4fHzQ8y+La2dMiBw+8tmQIGdPUq/tl2kHWW2F6n P2FJDhIIaw9+abOBhwVEt5se1Ys7OyI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664969724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWqavTCBrcIj9tKOpAH7Tq7IsYZOoIOHIBPY4AkRTF0=; b=UIlzpmHm0NgNpiOqcTWTk6jk5lJSHjHxEhjnUOSzpjA/fvwZKJDDGGzLTNLP1aA2R1enpl U0Ue/vx1GkeNrjDA== 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 5B83313345; Wed, 5 Oct 2022 11:35:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OvVbFfxrPWPhUQAAMHmgww (envelope-from ); Wed, 05 Oct 2022 11:35:24 +0000 Message-ID: <7f5424c9-23b0-823e-9a1f-7b4da7d8ac10@suse.cz> Date: Wed, 5 Oct 2022 13:35:10 +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] analyzer: remove unused variables To: gcc-patches@gcc.gnu.org Content-Language: en-US Cc: David Malcolm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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: Fixes: gcc/analyzer/call-summary.h:103:13: warning: private field 'm_called_fn' is not used [-Wunused-private-field] gcc/analyzer/engine.cc:1631:24: warning: unused parameter 'uncertainty' [-Wunused-parameter] gcc/analyzer/ChangeLog: * call-summary.cc (call_summary_replay::call_summary_replay): Remove unused variable and arguments. * call-summary.h: Likewise. * engine.cc (exploded_node::on_stmt): Likewise. (exploded_node::replay_call_summaries): Likewise. (exploded_node::replay_call_summary): Likewise. * exploded-graph.h (class exploded_node): Likewise. --- gcc/analyzer/call-summary.cc | 1 - gcc/analyzer/call-summary.h | 1 - gcc/analyzer/engine.cc | 5 +---- gcc/analyzer/exploded-graph.h | 2 -- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/gcc/analyzer/call-summary.cc b/gcc/analyzer/call-summary.cc index 9d8716da96e..a8e881472ea 100644 --- a/gcc/analyzer/call-summary.cc +++ b/gcc/analyzer/call-summary.cc @@ -171,7 +171,6 @@ call_summary_replay::call_summary_replay (const call_details &cd, call_summary *summary, const extrinsic_state &ext_state) : m_cd (cd), - m_called_fn (called_fn), m_summary (summary), m_ext_state (ext_state) { diff --git a/gcc/analyzer/call-summary.h b/gcc/analyzer/call-summary.h index f4c5ff0b3aa..07cd3f53ce6 100644 --- a/gcc/analyzer/call-summary.h +++ b/gcc/analyzer/call-summary.h @@ -100,7 +100,6 @@ private: const region *convert_region_from_summary_1 (const region *); const call_details &m_cd; - function *m_called_fn; call_summary *m_summary; const extrinsic_state &m_ext_state; diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index b4deee50f1f..735b5a3c061 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -1439,7 +1439,6 @@ exploded_node::on_stmt (exploded_graph &eg, snode, as_a (stmt), state, - uncertainty, path_ctxt, called_fn, called_fn_data, @@ -1598,7 +1597,6 @@ exploded_node::replay_call_summaries (exploded_graph &eg, const supernode *snode, const gcall *call_stmt, program_state *state, - uncertainty_t *uncertainty, path_context *path_ctxt, function *called_fn, per_function_data *called_fn_data, @@ -1612,7 +1610,7 @@ exploded_node::replay_call_summaries (exploded_graph &eg, /* Each summary will call bifurcate on the PATH_CTXT. */ for (auto summary : called_fn_data->m_summaries) - replay_call_summary (eg, snode, call_stmt, state, uncertainty, + replay_call_summary (eg, snode, call_stmt, state, path_ctxt, called_fn, summary, ctxt); path_ctxt->terminate_path (); @@ -1628,7 +1626,6 @@ exploded_node::replay_call_summary (exploded_graph &eg, const supernode *snode, const gcall *call_stmt, program_state *old_state, - uncertainty_t *uncertainty, path_context *path_ctxt, function *called_fn, call_summary *summary, diff --git a/gcc/analyzer/exploded-graph.h b/gcc/analyzer/exploded-graph.h index ea4a890b9ce..11e46cab160 100644 --- a/gcc/analyzer/exploded-graph.h +++ b/gcc/analyzer/exploded-graph.h @@ -271,7 +271,6 @@ class exploded_node : public dnode const supernode *snode, const gcall *call_stmt, program_state *state, - uncertainty_t *uncertainty, path_context *path_ctxt, function *called_fn, per_function_data *called_fn_data, @@ -280,7 +279,6 @@ class exploded_node : public dnode const supernode *snode, const gcall *call_stmt, program_state *state, - uncertainty_t *uncertainty, path_context *path_ctxt, function *called_fn, call_summary *summary, -- 2.37.3