Mark some more variables as static or include the appropriate header

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

From: Andres Freund <andres@anarazel.de>
This commit is contained in:
Peter Eisentraut 2014-02-08 21:21:46 -05:00
parent 6aa2bdf6a0
commit 66c04c981d
8 changed files with 8 additions and 7 deletions

View file

@ -51,7 +51,7 @@ typedef struct EventTriggerQueryState
struct EventTriggerQueryState *previous;
} EventTriggerQueryState;
EventTriggerQueryState *currentEventTriggerState = NULL;
static EventTriggerQueryState *currentEventTriggerState = NULL;
typedef struct
{

View file

@ -90,7 +90,7 @@ struct BackgroundWorkerHandle
uint64 generation;
};
BackgroundWorkerArray *BackgroundWorkerData;
static BackgroundWorkerArray *BackgroundWorkerData;
/*
* Calculate shared memory needed.

View file

@ -237,8 +237,6 @@ bool enable_bonjour = false;
char *bonjour_name;
bool restart_after_crash = true;
char *output_config_variable = NULL;
/* PIDs of special child processes; 0 when not running */
static pid_t StartupPID = 0,
BgWriterPID = 0,
@ -545,6 +543,7 @@ PostmasterMain(int argc, char *argv[])
char *userDoption = NULL;
bool listen_addr_saved = false;
int i;
char *output_config_variable = NULL;
MyProcPid = PostmasterPid = getpid();

View file

@ -19,6 +19,7 @@
#include <unistd.h>
#include "storage/s_lock.h"
#include "storage/barrier.h"
slock_t dummy_spinlock;

View file

@ -18,6 +18,7 @@
*/
#include "postgres.h"
#include "libpq/libpq-be.h"
#include "libpq/pqcomm.h"
#include "miscadmin.h"
#include "storage/backendid.h"

View file

@ -180,7 +180,7 @@ static const char *backend_options = "--single -F -O -c search_path=pg_catalog -
#ifdef WIN32
char *restrict_env;
#endif
const char *subdirs[] = {
static const char *subdirs[] = {
"global",
"pg_xlog",
"pg_xlog/archive_status",

View file

@ -49,7 +49,6 @@ typedef enum
HUGE_TLB_TRY
} HugeTlbType;
#ifdef EXEC_BACKEND
#ifndef WIN32
extern unsigned long UsedShmemSegID;
#else
@ -57,6 +56,7 @@ extern HANDLE UsedShmemSegID;
#endif
extern void *UsedShmemSegAddr;
#ifdef EXEC_BACKEND
extern void PGSharedMemoryReAttach(void);
#endif

View file

@ -56,7 +56,7 @@ static bool isdefine(void);
static bool isinformixdefine(void);
char *token_start;
int state_before;
static int state_before;
struct _yy_buffer
{