From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 9D2753858C27 for ; Mon, 15 Mar 2021 09:38:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9D2753858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id ABE7AAC1D; Mon, 15 Mar 2021 09:38:16 +0000 (UTC) Date: Mon, 15 Mar 2021 10:38:14 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com, mark@klomp.org Subject: [committed] Make some variables and functions static Message-ID: <20210315093813.GA6496@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2021 09:38:20 -0000 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 * 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[] =