public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-2584] analyzer: remove unused fields
Date: Mon, 12 Sep 2022 07:14:09 +0000 (GMT)	[thread overview]
Message-ID: <20220912071409.414253851A8A@sourceware.org> (raw)

https://gcc.gnu.org/g:ffaeb9dc58ea51ad99e82c6734e74c82e0a1cc5d

commit r13-2584-gffaeb9dc58ea51ad99e82c6734e74c82e0a1cc5d
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Sep 12 09:12:37 2022 +0200

    analyzer: remove unused fields
    
    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.

Diff:
---
 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.  */

                 reply	other threads:[~2022-09-12  7:14 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=20220912071409.414253851A8A@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@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).