public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Make some variables and functions static
@ 2021-03-15  9:38 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-03-15  9:38 UTC (permalink / raw)
  To: dwz, jakub, mark

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[] =

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-15  9:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15  9:38 [committed] Make some variables and functions static Tom de Vries

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).