[committed] Make some variables and functions static
Tom de Vries
tdevries@suse.de
Mon Mar 15 09:38:14 GMT 2021
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[] =
More information about the Dwz
mailing list