Commit 66c04c98 authored by Peter Eisentraut's avatar Peter Eisentraut

Mark some more variables as static or include the appropriate header

Detected by clang's -Wmissing-variable-declarations.

From: Andres Freund <andres@anarazel.de>
parent 6aa2bdf6
...@@ -51,7 +51,7 @@ typedef struct EventTriggerQueryState ...@@ -51,7 +51,7 @@ typedef struct EventTriggerQueryState
struct EventTriggerQueryState *previous; struct EventTriggerQueryState *previous;
} EventTriggerQueryState; } EventTriggerQueryState;
EventTriggerQueryState *currentEventTriggerState = NULL; static EventTriggerQueryState *currentEventTriggerState = NULL;
typedef struct typedef struct
{ {
......
...@@ -90,7 +90,7 @@ struct BackgroundWorkerHandle ...@@ -90,7 +90,7 @@ struct BackgroundWorkerHandle
uint64 generation; uint64 generation;
}; };
BackgroundWorkerArray *BackgroundWorkerData; static BackgroundWorkerArray *BackgroundWorkerData;
/* /*
* Calculate shared memory needed. * Calculate shared memory needed.
......
...@@ -237,8 +237,6 @@ bool enable_bonjour = false; ...@@ -237,8 +237,6 @@ bool enable_bonjour = false;
char *bonjour_name; char *bonjour_name;
bool restart_after_crash = true; bool restart_after_crash = true;
char *output_config_variable = NULL;
/* PIDs of special child processes; 0 when not running */ /* PIDs of special child processes; 0 when not running */
static pid_t StartupPID = 0, static pid_t StartupPID = 0,
BgWriterPID = 0, BgWriterPID = 0,
...@@ -545,6 +543,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -545,6 +543,7 @@ PostmasterMain(int argc, char *argv[])
char *userDoption = NULL; char *userDoption = NULL;
bool listen_addr_saved = false; bool listen_addr_saved = false;
int i; int i;
char *output_config_variable = NULL;
MyProcPid = PostmasterPid = getpid(); MyProcPid = PostmasterPid = getpid();
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <unistd.h> #include <unistd.h>
#include "storage/s_lock.h" #include "storage/s_lock.h"
#include "storage/barrier.h"
slock_t dummy_spinlock; slock_t dummy_spinlock;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include "postgres.h" #include "postgres.h"
#include "libpq/libpq-be.h"
#include "libpq/pqcomm.h" #include "libpq/pqcomm.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "storage/backendid.h" #include "storage/backendid.h"
......
...@@ -180,7 +180,7 @@ static const char *backend_options = "--single -F -O -c search_path=pg_catalog - ...@@ -180,7 +180,7 @@ static const char *backend_options = "--single -F -O -c search_path=pg_catalog -
#ifdef WIN32 #ifdef WIN32
char *restrict_env; char *restrict_env;
#endif #endif
const char *subdirs[] = { static const char *subdirs[] = {
"global", "global",
"pg_xlog", "pg_xlog",
"pg_xlog/archive_status", "pg_xlog/archive_status",
......
...@@ -49,7 +49,6 @@ typedef enum ...@@ -49,7 +49,6 @@ typedef enum
HUGE_TLB_TRY HUGE_TLB_TRY
} HugeTlbType; } HugeTlbType;
#ifdef EXEC_BACKEND
#ifndef WIN32 #ifndef WIN32
extern unsigned long UsedShmemSegID; extern unsigned long UsedShmemSegID;
#else #else
...@@ -57,6 +56,7 @@ extern HANDLE UsedShmemSegID; ...@@ -57,6 +56,7 @@ extern HANDLE UsedShmemSegID;
#endif #endif
extern void *UsedShmemSegAddr; extern void *UsedShmemSegAddr;
#ifdef EXEC_BACKEND
extern void PGSharedMemoryReAttach(void); extern void PGSharedMemoryReAttach(void);
#endif #endif
......
...@@ -56,7 +56,7 @@ static bool isdefine(void); ...@@ -56,7 +56,7 @@ static bool isdefine(void);
static bool isinformixdefine(void); static bool isinformixdefine(void);
char *token_start; char *token_start;
int state_before; static int state_before;
struct _yy_buffer struct _yy_buffer
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment