Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit720b0ea

Browse files
committed
Convert some extern variables to static
These probably should have been static all along, it was onlyforgotten 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
1 parenta4c87df commit720b0ea

File tree

29 files changed

+99
-96
lines changed

29 files changed

+99
-96
lines changed

‎contrib/isn/EAN13.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
/* where the digit set begins, and how many of them are in the table */
14-
constunsignedEAN13_index[10][2]= {
14+
staticconstunsignedEAN13_index[10][2]= {
1515
{0,6},
1616
{6,1},
1717
{7,1},
@@ -23,7 +23,7 @@ const unsigned EAN13_index[10][2] = {
2323
{90,17},
2424
{107,12},
2525
};
26-
constchar*EAN13_range[][2]= {
26+
staticconstchar*EAN13_range[][2]= {
2727
{"000","019"},/* GS1 US */
2828
{"020","029"},/* Restricted distribution (MO defined) */
2929
{"030","039"},/* GS1 US */

‎contrib/isn/ISBN.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535

3636
/* where the digit set begins, and how many of them are in the table */
37-
constunsignedISBN_index[10][2]= {
37+
staticconstunsignedISBN_index[10][2]= {
3838
{0,6},
3939
{6,6},
4040
{12,8},
@@ -47,7 +47,7 @@ const unsigned ISBN_index[10][2] = {
4747
{192,718},
4848
};
4949

50-
constchar*ISBN_range[][2]= {
50+
staticconstchar*ISBN_range[][2]= {
5151
{"0-00","0-19"},
5252
{"0-200","0-699"},
5353
{"0-7000","0-8499"},
@@ -967,7 +967,7 @@ const char *ISBN_range[][2] = {
967967
*/
968968

969969
/* where the digit set begins, and how many of them are in the table */
970-
constunsignedISBN_index_new[10][2]= {
970+
staticconstunsignedISBN_index_new[10][2]= {
971971
{0,0},
972972
{0,5},
973973
{5,0},
@@ -980,7 +980,7 @@ const unsigned ISBN_index_new[10][2] = {
980980
{5,0},
981981
};
982982

983-
constchar*ISBN_range_new[][2]= {
983+
staticconstchar*ISBN_range_new[][2]= {
984984
{"10-00","10-19"},
985985
{"10-200","10-699"},
986986
{"10-7000","10-8999"},

‎contrib/isn/ISMN.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131

3232
/* where the digit set begins, and how many of them are in the table */
33-
constunsignedISMN_index[10][2]= {
33+
staticconstunsignedISMN_index[10][2]= {
3434
{0,5},
3535
{5,0},
3636
{5,0},
@@ -42,7 +42,7 @@ const unsigned ISMN_index[10][2] = {
4242
{5,0},
4343
{5,0},
4444
};
45-
constchar*ISMN_range[][2]= {
45+
staticconstchar*ISMN_range[][2]= {
4646
{"0-000","0-099"},
4747
{"0-1000","0-3999"},
4848
{"0-40000","0-69999"},

‎contrib/isn/ISSN.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232

3333
/* where the digit set begins, and how many of them are in the table */
34-
constunsignedISSN_index[10][2]= {
34+
staticconstunsignedISSN_index[10][2]= {
3535
{0,1},
3636
{0,1},
3737
{0,1},
@@ -43,7 +43,7 @@ const unsigned ISSN_index[10][2] = {
4343
{0,1},
4444
{0,1},
4545
};
46-
constchar*ISSN_range[][2]= {
46+
staticconstchar*ISSN_range[][2]= {
4747
{"0000-000","9999-999"},
4848
{NULL,NULL}
4949
};

‎contrib/isn/UPC.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
/* where the digit set begins, and how many of them are in the table */
14-
constunsignedUPC_index[10][2]= {
14+
staticconstunsignedUPC_index[10][2]= {
1515
{0,0},
1616
{0,0},
1717
{0,0},
@@ -23,6 +23,6 @@ const unsigned UPC_index[10][2] = {
2323
{0,0},
2424
{0,0},
2525
};
26-
constchar*UPC_range[][2]= {
26+
staticconstchar*UPC_range[][2]= {
2727
{NULL,NULL}
2828
};

‎src/backend/commands/user.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ typedef struct
8484
/* GUC parameters */
8585
intPassword_encryption=PASSWORD_TYPE_SCRAM_SHA_256;
8686
char*createrole_self_grant="";
87-
boolcreaterole_self_grant_enabled= false;
88-
GrantRoleOptionscreaterole_self_grant_options;
87+
staticboolcreaterole_self_grant_enabled= false;
88+
staticGrantRoleOptionscreaterole_self_grant_options;
8989

9090
/* Hook to check passwords in CreateRole() and AlterRole() */
9191
check_password_hook_typecheck_password_hook=NULL;

‎src/backend/postmaster/launch_backend.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ typedef struct
176176
boolshmem_attach;
177177
}child_process_kind;
178178

179-
child_process_kindchild_process_kinds[]= {
179+
staticchild_process_kindchild_process_kinds[]= {
180180
[B_INVALID]= {"invalid",NULL, false},
181181

182182
[B_BACKEND]= {"backend",BackendMain, true},

‎src/backend/replication/logical/slotsync.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ typedef struct SlotSyncCtxStruct
103103
slock_tmutex;
104104
}SlotSyncCtxStruct;
105105

106-
SlotSyncCtxStruct*SlotSyncCtx=NULL;
106+
staticSlotSyncCtxStruct*SlotSyncCtx=NULL;
107107

108108
/* GUC variable */
109109
boolsync_replication_slots= false;

‎src/backend/replication/logical/worker.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ typedef enum
275275
}TransApplyAction;
276276

277277
/* errcontext tracker */
278-
ApplyErrorCallbackArgapply_error_callback_arg=
278+
staticApplyErrorCallbackArgapply_error_callback_arg=
279279
{
280280
.command=0,
281281
.rel=NULL,

‎src/backend/utils/misc/guc_tables.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,8 @@ boolcheck_function_bodies = true;
517517
* This GUC exists solely for backward compatibility, check its definition for
518518
* details.
519519
*/
520-
booldefault_with_oids= false;
520+
staticbooldefault_with_oids= false;
521+
521522
boolcurrent_role_is_superuser;
522523

523524
intlog_min_error_statement=ERROR;
@@ -555,15 +556,15 @@ inttcp_user_timeout;
555556
* This avoids breaking compatibility with clients that have never supported
556557
* renegotiation and therefore always try to zero it.
557558
*/
558-
intssl_renegotiation_limit;
559+
staticintssl_renegotiation_limit;
559560

560561
/*
561562
* This really belongs in pg_shmem.c, but is defined here so that it doesn't
562563
* need to be duplicated in all the different implementations of pg_shmem.c.
563564
*/
564565
inthuge_pages=HUGE_PAGES_TRY;
565566
inthuge_page_size;
566-
inthuge_pages_status=HUGE_PAGES_UNKNOWN;
567+
staticinthuge_pages_status=HUGE_PAGES_UNKNOWN;
567568

568569
/*
569570
* These variables are all dummies that don't do anything, except in some

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp