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

Commit 09cd33f

Browse files
committed
Add 'static' to file-local variables missing it.
Noticed when comparing the set of exported symbols without / with -fvisibility=hidden after adding PGDLLIMPORT to intentionally exported symbols. Discussion: https://postgr.es/m/20220512164513.vaheofqp2q24l65r@alap3.anarazel.de
1 parent 905c020 commit 09cd33f

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/backend/access/common/reloptions.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ static relopt_real realRelOpts[] =
475475
};
476476

477477
/* values from StdRdOptIndexCleanup */
478-
relopt_enum_elt_def StdRdOptIndexCleanupValues[] =
478+
static relopt_enum_elt_def StdRdOptIndexCleanupValues[] =
479479
{
480480
{"auto", STDRD_OPTION_VACUUM_INDEX_CLEANUP_AUTO},
481481
{"on", STDRD_OPTION_VACUUM_INDEX_CLEANUP_ON},
@@ -490,7 +490,7 @@ relopt_enum_elt_def StdRdOptIndexCleanupValues[] =
490490
};
491491

492492
/* values from GistOptBufferingMode */
493-
relopt_enum_elt_def gistBufferingOptValues[] =
493+
static relopt_enum_elt_def gistBufferingOptValues[] =
494494
{
495495
{"auto", GIST_OPTION_BUFFERING_AUTO},
496496
{"on", GIST_OPTION_BUFFERING_ON},
@@ -499,7 +499,7 @@ relopt_enum_elt_def gistBufferingOptValues[] =
499499
};
500500

501501
/* values from ViewOptCheckOption */
502-
relopt_enum_elt_def viewCheckOptValues[] =
502+
static relopt_enum_elt_def viewCheckOptValues[] =
503503
{
504504
/* no value for NOT_SET */
505505
{"local", VIEW_OPTION_CHECK_OPTION_LOCAL},

src/backend/access/transam/commit_ts.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ typedef struct CommitTimestampShared
9898
bool commitTsActive;
9999
} CommitTimestampShared;
100100

101-
CommitTimestampShared *commitTsShared;
101+
static CommitTimestampShared *commitTsShared;
102102

103103

104104
/* GUC variable */

src/backend/access/transam/xact.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ bool bsysscan = false;
121121
* The XIDs are stored sorted in numerical order (not logical order) to make
122122
* lookups as fast as possible.
123123
*/
124-
FullTransactionId XactTopFullTransactionId = {InvalidTransactionId};
125-
int nParallelCurrentXids = 0;
126-
TransactionId *ParallelCurrentXids;
124+
static FullTransactionId XactTopFullTransactionId = {InvalidTransactionId};
125+
static int nParallelCurrentXids = 0;
126+
static TransactionId *ParallelCurrentXids;
127127

128128
/*
129129
* Miscellaneous flag bits to record events which occur on the top level

src/backend/catalog/storage.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ typedef struct PendingRelSync
7373
} PendingRelSync;
7474

7575
static PendingRelDelete *pendingDeletes = NULL; /* head of linked list */
76-
HTAB *pendingSyncHash = NULL;
76+
static HTAB *pendingSyncHash = NULL;
7777

7878

7979
/*

src/backend/replication/logical/launcher.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ typedef struct LogicalRepCtxStruct
6565
LogicalRepWorker workers[FLEXIBLE_ARRAY_MEMBER];
6666
} LogicalRepCtxStruct;
6767

68-
LogicalRepCtxStruct *LogicalRepCtx;
68+
static LogicalRepCtxStruct *LogicalRepCtx;
6969

7070
static void ApplyLauncherWakeup(void);
7171
static void logicalrep_launcher_onexit(int code, Datum arg);

src/backend/replication/logical/tablesync.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static bool table_states_valid = false;
124124
static List *table_states_not_ready = NIL;
125125
static bool FetchTableStates(bool *started_tx);
126126

127-
StringInfo copybuf = NULL;
127+
static StringInfo copybuf = NULL;
128128

129129
/*
130130
* Exit routine for synchronization worker.

src/backend/replication/logical/worker.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static MemoryContext LogicalStreamingContext = NULL;
251251
WalReceiverConn *LogRepWorkerWalRcvConn = NULL;
252252

253253
Subscription *MySubscription = NULL;
254-
bool MySubscriptionValid = false;
254+
static bool MySubscriptionValid = false;
255255

256256
bool in_remote_transaction = false;
257257
static XLogRecPtr remote_final_lsn = InvalidXLogRecPtr;

src/backend/tcop/cmdtag.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ typedef struct CommandTagBehavior
2828
#define PG_CMDTAG(tag, name, evtrgok, rwrok, rowcnt) \
2929
{ name, evtrgok, rwrok, rowcnt },
3030

31-
const CommandTagBehavior tag_behavior[COMMAND_TAG_NEXTTAG] = {
31+
static const CommandTagBehavior tag_behavior[COMMAND_TAG_NEXTTAG] = {
3232
#include "tcop/cmdtaglist.h"
3333
};
3434

0 commit comments

Comments
 (0)