public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com, mark@klomp.org
Subject: [committed] Make some variables and functions static
Date: Mon, 15 Mar 2021 10:38:14 +0100	[thread overview]
Message-ID: <20210315093813.GA6496@delia> (raw)

Hi,

There is a number of variables and functions in dwz.c that is external but
could be static.  Make these static.

Committed to trunk.

Thanks,
- Tom

Make some variables and functions static

2021-03-15  Tom de Vries  <tdevries@suse.de>

	* dwz.c (odr, odr_mode, odr_mode_parsed, odr_active_p, stats)
	(dump_die, verify_edges, die_count_method_parsed)
	(deduplication_mode_parsed): Make static.

---
 dwz.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dwz.c b/dwz.c
index 5975cc7..956062a 100644
--- a/dwz.c
+++ b/dwz.c
@@ -283,11 +283,11 @@ enum die_count_methods
 };
 static enum die_count_methods die_count_method = estimate;
 
-int odr = 0;
+static int odr = 0;
 enum odr_mode { ODR_BASIC, ODR_LINK };
-enum odr_mode odr_mode = ODR_LINK;
-int odr_mode_parsed = 0;
-bool odr_active_p = false;
+static enum odr_mode odr_mode = ODR_LINK;
+static int odr_mode_parsed = 0;
+static bool odr_active_p = false;
 
 /* Struct to gather statistics.  */
 struct stats
@@ -306,7 +306,7 @@ struct stats
   unsigned int pu_ph2_cnt;
   unsigned int pu_toplevel_die_cnt;
 };
-struct stats *stats;
+static struct stats *stats;
 
 /* Initialize stats struct.  */
 static void
@@ -5597,7 +5597,7 @@ dump_die_with_indent (int indent, dw_die_ref die)
 }
 
 /* Dump DIE to stderr.  */
-void USED
+static void USED
 dump_die (dw_die_ref die)
 {
   dump_die_with_indent (0, die);
@@ -8957,7 +8957,7 @@ verify_edges_1 (struct import_cu *ipu, unsigned int *ic, unsigned int *oc,
 
 /* Helper function for debugging create_import_tree.  Call verify_edges_1
    on all CUs and PUs.  */
-void
+static void
 verify_edges (struct import_cu **ipus, unsigned int npus, unsigned int ncus,
 	      unsigned int phase)
 {
@@ -16314,8 +16314,8 @@ make_temp_file (const char *name)
   return fd;
 }
 
-int die_count_method_parsed;
-int deduplication_mode_parsed;
+static int die_count_method_parsed;
+static int deduplication_mode_parsed;
 
 /* Options for getopt_long.  */
 static struct option dwz_options[] =

                 reply	other threads:[~2021-03-15  9:38 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=20210315093813.GA6496@delia \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=mark@klomp.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).