svn commit: r295236 - user/ngie/bsnmp_cleanup/usr.sbin/bsnmpd/tools/libbsnmptools

Garrett Cooper ngie at FreeBSD.org
Thu Feb 4 08:11:46 UTC 2016


Author: ngie
Date: Thu Feb  4 08:11:44 2016
New Revision: 295236
URL: https://svnweb.freebsd.org/changeset/base/295236

Log:
  Staticize several variables used locally in order to fix
  -Wmissing-variable-declarations	issues

Modified:
  user/ngie/bsnmp_cleanup/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c

Modified: user/ngie/bsnmp_cleanup/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
==============================================================================
--- user/ngie/bsnmp_cleanup/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c	Thu Feb  4 06:39:20 2016	(r295235)
+++ user/ngie/bsnmp_cleanup/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c	Thu Feb  4 08:11:44 2016	(r295236)
@@ -140,9 +140,9 @@ struct input {
 	LIST_ENTRY(input) link;
 };
 
-LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs);
-struct input *input = NULL;
-int32_t pbchar = -1;
+static LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs);
+static struct input *input = NULL;
+static int32_t pbchar = -1;
 
 #define	MAX_PATHS	100
 
@@ -301,18 +301,18 @@ static const struct {
 	{ NULL, 0, 0 }
 };
 
-struct {
+static struct {
 	/* Current OID type, regarding table membership. */
 	enum snmp_tbl_entry	tbl_type;
 	/* A pointer to a structure in table list to add to its members. */
 	struct snmp_index_entry	*table_idx;
 } table_data;
 
-struct asn_oid current_oid;
-char nexttok[MAXSTR];
-u_long val;		/* integer values */
-int32_t	all_cond;	/* all conditions are true */
-int32_t saved_token = -1;
+static struct asn_oid current_oid;
+static char nexttok[MAXSTR];
+static u_long val;		/* integer values */
+static int32_t	all_cond;	/* all conditions are true */
+static int32_t saved_token = -1;
 
 /* Prepare the global data before parsing a new file. */
 static void


More information about the svn-src-user mailing list