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

Commit66c04c9

Browse files
committed
Mark some more variables as static or include the appropriate header
Detected by clang's -Wmissing-variable-declarations.From: Andres Freund <andres@anarazel.de>
1 parent6aa2bdf commit66c04c9

File tree

8 files changed

+8
-7
lines changed

8 files changed

+8
-7
lines changed

‎src/backend/commands/event_trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ typedef struct EventTriggerQueryState
5151
structEventTriggerQueryState*previous;
5252
}EventTriggerQueryState;
5353

54-
EventTriggerQueryState*currentEventTriggerState=NULL;
54+
staticEventTriggerQueryState*currentEventTriggerState=NULL;
5555

5656
typedefstruct
5757
{

‎src/backend/postmaster/bgworker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct BackgroundWorkerHandle
9090
uint64generation;
9191
};
9292

93-
BackgroundWorkerArray*BackgroundWorkerData;
93+
staticBackgroundWorkerArray*BackgroundWorkerData;
9494

9595
/*
9696
* Calculate shared memory needed.

‎src/backend/postmaster/postmaster.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,6 @@ boolenable_bonjour = false;
237237
char*bonjour_name;
238238
boolrestart_after_crash= true;
239239

240-
char*output_config_variable=NULL;
241-
242240
/* PIDs of special child processes; 0 when not running */
243241
staticpid_tStartupPID=0,
244242
BgWriterPID=0,
@@ -545,6 +543,7 @@ PostmasterMain(int argc, char *argv[])
545543
char*userDoption=NULL;
546544
boollisten_addr_saved= false;
547545
inti;
546+
char*output_config_variable=NULL;
548547

549548
MyProcPid=PostmasterPid=getpid();
550549

‎src/backend/storage/lmgr/s_lock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include<unistd.h>
2020

2121
#include"storage/s_lock.h"
22+
#include"storage/barrier.h"
2223

2324
slock_tdummy_spinlock;
2425

‎src/backend/utils/init/globals.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
#include"postgres.h"
2020

21+
#include"libpq/libpq-be.h"
2122
#include"libpq/pqcomm.h"
2223
#include"miscadmin.h"
2324
#include"storage/backendid.h"

‎src/bin/initdb/initdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static const char *backend_options = "--single -F -O -c search_path=pg_catalog -
180180
#ifdefWIN32
181181
char*restrict_env;
182182
#endif
183-
constchar*subdirs[]= {
183+
staticconstchar*subdirs[]= {
184184
"global",
185185
"pg_xlog",
186186
"pg_xlog/archive_status",

‎src/include/storage/pg_shmem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ typedef enum
4949
HUGE_TLB_TRY
5050
}HugeTlbType;
5151

52-
#ifdefEXEC_BACKEND
5352
#ifndefWIN32
5453
externunsigned longUsedShmemSegID;
5554
#else
5655
externHANDLEUsedShmemSegID;
5756
#endif
5857
externvoid*UsedShmemSegAddr;
5958

59+
#ifdefEXEC_BACKEND
6060
externvoidPGSharedMemoryReAttach(void);
6161
#endif
6262

‎src/interfaces/ecpg/preproc/pgc.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static bool isdefine(void);
5656
staticboolisinformixdefine(void);
5757

5858
char *token_start;
59-
int state_before;
59+
staticint state_before;
6060

6161
struct_yy_buffer
6262
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp