Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 30b9654

Browse files
committed
Mark variables 'static' where possible. Move GinFuzzySearchLimit to ginget.c
Per "clang -Wmissing-variable-declarations" output, posted by Andres Freund. I didn't silence all those warnings, though, only the most obvious cases.
1 parent 1f0626e commit 30b9654

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

src/backend/access/gin/ginget.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "utils/datum.h"
2121
#include "utils/memutils.h"
2222

23+
/* GUC parameter */
24+
int GinFuzzySearchLimit = 0;
2325

2426
typedef struct pendingPosition
2527
{

src/backend/storage/lmgr/lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ typedef struct
238238
uint32 count[FAST_PATH_STRONG_LOCK_HASH_PARTITIONS];
239239
} FastPathStrongRelationLockData;
240240

241-
FastPathStrongRelationLockData *FastPathStrongRelationLocks;
241+
static FastPathStrongRelationLockData *FastPathStrongRelationLocks;
242242

243243

244244
/*

src/backend/utils/cache/relfilenodemap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
static HTAB *RelfilenodeMapHash = NULL;
3434

3535
/* built first time through in InitializeRelfilenodeMap */
36-
ScanKeyData relfilenode_skey[2];
36+
static ScanKeyData relfilenode_skey[2];
3737

3838
typedef struct
3939
{

src/backend/utils/init/globals.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,3 @@ int VacuumPageDirty = 0;
122122

123123
int VacuumCostBalance = 0; /* working state for vacuum */
124124
bool VacuumCostActive = false;
125-
126-
int GinFuzzySearchLimit = 0;

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@
3434

3535

3636
/* Global options */
37-
char *basedir = NULL;
37+
static char *basedir = NULL;
3838
static char *xlog_dir = "";
39-
char format = 'p'; /* p(lain)/t(ar) */
40-
char *label = "pg_basebackup base backup";
41-
bool showprogress = false;
42-
int verbose = 0;
43-
int compresslevel = 0;
44-
bool includewal = false;
45-
bool streamwal = false;
46-
bool fastcheckpoint = false;
47-
bool writerecoveryconf = false;
48-
int standby_message_timeout = 10 * 1000; /* 10 sec = default */
39+
static char format = 'p'; /* p(lain)/t(ar) */
40+
static char *label = "pg_basebackup base backup";
41+
static bool showprogress = false;
42+
static int verbose = 0;
43+
static int compresslevel = 0;
44+
static bool includewal = false;
45+
static bool streamwal = false;
46+
static bool fastcheckpoint = false;
47+
static bool writerecoveryconf = false;
48+
static int standby_message_timeout = 10 * 1000; /* 10 sec = default */
4949

5050
/* Progress counters */
5151
static uint64 totalsize;

src/bin/pg_basebackup/pg_receivexlog.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
#define RECONNECT_SLEEP_TIME 5
3333

3434
/* Global options */
35-
char *basedir = NULL;
36-
int verbose = 0;
37-
int noloop = 0;
38-
int standby_message_timeout = 10 * 1000; /* 10 sec = default */
39-
volatile bool time_to_abort = false;
35+
static char *basedir = NULL;
36+
static int verbose = 0;
37+
static int noloop = 0;
38+
static int standby_message_timeout = 10 * 1000; /* 10 sec = default */
39+
static volatile bool time_to_abort = false;
4040

4141

4242
static void usage(void);

src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ bool g_verbose; /* User wants verbose narration of our
9090
* activities. */
9191

9292
/* various user-settable parameters */
93-
bool schemaOnly;
94-
bool dataOnly;
95-
int dumpSections; /* bitmask of chosen sections */
96-
bool aclsSkip;
97-
const char *lockWaitTimeout;
93+
static bool schemaOnly;
94+
static bool dataOnly;
95+
static int dumpSections; /* bitmask of chosen sections */
96+
static bool aclsSkip;
97+
static const char *lockWaitTimeout;
9898

9999
/* subquery used to convert user ID (eg, datdba) to user name */
100100
static const char *username_subquery;

0 commit comments

Comments
 (0)