diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c
index f2ee2fb96668c3d5688796b4ef2101c385ab94e4..2e3e86f9d35367f47b45f14810ef951067de3dd0 100644
--- a/src/backend/access/gin/ginget.c
+++ b/src/backend/access/gin/ginget.c
@@ -20,6 +20,8 @@
 #include "utils/datum.h"
 #include "utils/memutils.h"
 
+/* GUC parameter */
+int			GinFuzzySearchLimit = 0;
 
 typedef struct pendingPosition
 {
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index e4c9fa4ab423b96c8b5cdb7977f7ecc5d9d709ad..536be441890d0378933441b2b4ee60e3e231bfe0 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -238,7 +238,7 @@ typedef struct
 	uint32		count[FAST_PATH_STRONG_LOCK_HASH_PARTITIONS];
 } FastPathStrongRelationLockData;
 
-FastPathStrongRelationLockData *FastPathStrongRelationLocks;
+static FastPathStrongRelationLockData *FastPathStrongRelationLocks;
 
 
 /*
diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c
index 1469bfaba2f2d0580c981f078bd230fb1c6d162e..6806fbb073b0b08f35f6df97aa9bdf5a7fdd3870 100644
--- a/src/backend/utils/cache/relfilenodemap.c
+++ b/src/backend/utils/cache/relfilenodemap.c
@@ -33,7 +33,7 @@
 static HTAB *RelfilenodeMapHash = NULL;
 
 /* built first time through in InitializeRelfilenodeMap */
-ScanKeyData relfilenode_skey[2];
+static ScanKeyData relfilenode_skey[2];
 
 typedef struct
 {
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c
index e76704f315334e9be0f3cae5af06de41d0e5829b..dd1309be0571e680b586d0859424634c35501297 100644
--- a/src/backend/utils/init/globals.c
+++ b/src/backend/utils/init/globals.c
@@ -122,5 +122,3 @@ int			VacuumPageDirty = 0;
 
 int			VacuumCostBalance = 0;		/* working state for vacuum */
 bool		VacuumCostActive = false;
-
-int			GinFuzzySearchLimit = 0;
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 6706c0c7a90b701586d7eca8a4e7354aac9074df..d16067f22423d1d48473beca1ba383cf2577aea2 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -34,18 +34,18 @@
 
 
 /* Global options */
-char	   *basedir = NULL;
+static char *basedir = NULL;
 static char *xlog_dir = "";
-char		format = 'p';		/* p(lain)/t(ar) */
-char	   *label = "pg_basebackup base backup";
-bool		showprogress = false;
-int			verbose = 0;
-int			compresslevel = 0;
-bool		includewal = false;
-bool		streamwal = false;
-bool		fastcheckpoint = false;
-bool		writerecoveryconf = false;
-int			standby_message_timeout = 10 * 1000;		/* 10 sec = default */
+static char	format = 'p';		/* p(lain)/t(ar) */
+static char *label = "pg_basebackup base backup";
+static bool	showprogress = false;
+static int verbose = 0;
+static int	compresslevel = 0;
+static bool	includewal = false;
+static bool	streamwal = false;
+static bool	fastcheckpoint = false;
+static bool	writerecoveryconf = false;
+static int	standby_message_timeout = 10 * 1000;		/* 10 sec = default */
 
 /* Progress counters */
 static uint64 totalsize;
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
index 252a7e08d6727e9e3aa08cf1fc3eb7e925638104..3de51ef461d6435847df94e6afee9799f1505612 100644
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ b/src/bin/pg_basebackup/pg_receivexlog.c
@@ -32,11 +32,11 @@
 #define RECONNECT_SLEEP_TIME 5
 
 /* Global options */
-char	   *basedir = NULL;
-int			verbose = 0;
-int			noloop = 0;
-int			standby_message_timeout = 10 * 1000;		/* 10 sec = default */
-volatile bool time_to_abort = false;
+static char *basedir = NULL;
+static int	verbose = 0;
+static int	noloop = 0;
+static int	standby_message_timeout = 10 * 1000;		/* 10 sec = default */
+static volatile bool time_to_abort = false;
 
 
 static void usage(void);
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 224e8cbe086ca9de88e4512bc25a7a1998a9532a..837e7844312f61bfaf732b9da2421aac57ebcf27 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -90,11 +90,11 @@ bool		g_verbose;			/* User wants verbose narration of our
 								 * activities. */
 
 /* various user-settable parameters */
-bool		schemaOnly;
-bool		dataOnly;
-int			dumpSections;		/* bitmask of chosen sections */
-bool		aclsSkip;
-const char *lockWaitTimeout;
+static bool	schemaOnly;
+static bool	dataOnly;
+static int	dumpSections;		/* bitmask of chosen sections */
+static bool	aclsSkip;
+static const char *lockWaitTimeout;
 
 /* subquery used to convert user ID (eg, datdba) to user name */
 static const char *username_subquery;