1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Convert some extern variables to static

These probably should have been static all along, it was only
forgotten out of sloppiness.

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org
This commit is contained in:
Peter Eisentraut
2024-07-02 06:53:19 +02:00
parent a4c87df43a
commit 720b0eaae9
29 changed files with 99 additions and 96 deletions

View File

@@ -84,8 +84,8 @@ typedef struct
/* GUC parameters */
int Password_encryption = PASSWORD_TYPE_SCRAM_SHA_256;
char *createrole_self_grant = "";
bool createrole_self_grant_enabled = false;
GrantRoleOptions createrole_self_grant_options;
static bool createrole_self_grant_enabled = false;
static GrantRoleOptions createrole_self_grant_options;
/* Hook to check passwords in CreateRole() and AlterRole() */
check_password_hook_type check_password_hook = NULL;

View File

@@ -176,7 +176,7 @@ typedef struct
bool shmem_attach;
} child_process_kind;
child_process_kind child_process_kinds[] = {
static child_process_kind child_process_kinds[] = {
[B_INVALID] = {"invalid", NULL, false},
[B_BACKEND] = {"backend", BackendMain, true},

View File

@@ -103,7 +103,7 @@ typedef struct SlotSyncCtxStruct
slock_t mutex;
} SlotSyncCtxStruct;
SlotSyncCtxStruct *SlotSyncCtx = NULL;
static SlotSyncCtxStruct *SlotSyncCtx = NULL;
/* GUC variable */
bool sync_replication_slots = false;

View File

@@ -275,7 +275,7 @@ typedef enum
} TransApplyAction;
/* errcontext tracker */
ApplyErrorCallbackArg apply_error_callback_arg =
static ApplyErrorCallbackArg apply_error_callback_arg =
{
.command = 0,
.rel = NULL,

View File

@@ -517,7 +517,8 @@ bool check_function_bodies = true;
* This GUC exists solely for backward compatibility, check its definition for
* details.
*/
bool default_with_oids = false;
static bool default_with_oids = false;
bool current_role_is_superuser;
int log_min_error_statement = ERROR;
@@ -555,7 +556,7 @@ int tcp_user_timeout;
* This avoids breaking compatibility with clients that have never supported
* renegotiation and therefore always try to zero it.
*/
int ssl_renegotiation_limit;
static int ssl_renegotiation_limit;
/*
* This really belongs in pg_shmem.c, but is defined here so that it doesn't
@@ -563,7 +564,7 @@ int ssl_renegotiation_limit;
*/
int huge_pages = HUGE_PAGES_TRY;
int huge_page_size;
int huge_pages_status = HUGE_PAGES_UNKNOWN;
static int huge_pages_status = HUGE_PAGES_UNKNOWN;
/*
* These variables are all dummies that don't do anything, except in some