public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: David Malcolm <dmalcolm@redhat.com>
Subject: [PATCH][pushed] analyzer: remove unused fields
Date: Mon, 12 Sep 2022 09:13:34 +0200	[thread overview]
Message-ID: <ec3b79b5-4a7d-f620-024c-61e9517a9e66@suse.cz> (raw)

Fixes:
gcc/analyzer/region-model.cc:5918:8: warning: private field 'm_record_type' is not used [-Wunused-private-field]
gcc/analyzer/region-model.cc:6305:25: warning: private field 'm_mgr' is not used [-Wunused-private-field]

gcc/analyzer/ChangeLog:

	* region-model.cc (region_model::maybe_complain_about_infoleak):
	  Remove unused fields.
---
 gcc/analyzer/region-model.cc | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 13b8e3eaf1b..22c52872c3e 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -5838,7 +5838,6 @@ public:
   };
 
   record_layout (tree record_type)
-  : m_record_type (record_type)
   {
     gcc_assert (TREE_CODE (record_type) == RECORD_TYPE);
 
@@ -5918,7 +5917,6 @@ private:
       }
   }
 
-  tree m_record_type;
   auto_vec<item> m_items;
 };
 
@@ -5932,12 +5930,10 @@ class exposure_through_uninit_copy
 public:
   exposure_through_uninit_copy (const region *src_region,
 				const region *dest_region,
-				const svalue *copied_sval,
-				region_model_manager *mgr)
+				const svalue *copied_sval)
   : m_src_region (src_region),
     m_dest_region (dest_region),
-    m_copied_sval (copied_sval),
-    m_mgr (mgr)
+    m_copied_sval (copied_sval)
   {
     gcc_assert (m_copied_sval->get_kind () == SK_POISONED
 		|| m_copied_sval->get_kind () == SK_COMPOUND);
@@ -6305,7 +6301,6 @@ private:
   const region *m_src_region;
   const region *m_dest_region;
   const svalue *m_copied_sval;
-  region_model_manager *m_mgr;
 };
 
 /* Return true if any part of SVAL is uninitialized.  */
@@ -6351,8 +6346,7 @@ region_model::maybe_complain_about_infoleak (const region *dst_reg,
   if (contains_uninit_p (copied_sval))
     ctxt->warn (new exposure_through_uninit_copy (src_reg,
 						  dst_reg,
-						  copied_sval,
-						  m_mgr));
+						  copied_sval));
 }
 
 /* class noop_region_model_context : public region_model_context.  */
-- 
2.37.3


                 reply	other threads:[~2022-09-12  7:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec3b79b5-4a7d-f620-024c-61e9517a9e66@suse.cz \
    --to=mliska@suse.cz \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).