From: Michael Meskes Date: Wed, 22 Oct 2014 08:35:36 +0000 (+0200) Subject: Small code cleanup. X-Git-Tag: jit-before-rebase-2017-11-03~6396 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=2ae7811db87bf54e8a70aae3cfd9f7cc7eff0bc4;p=users%2Fandresfreund%2Fpostgres.git Small code cleanup. Declare static variable as static and external as extern. --- diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header index 9c5018c249..a2be29c434 100644 --- a/src/interfaces/ecpg/preproc/ecpg.header +++ b/src/interfaces/ecpg/preproc/ecpg.header @@ -59,7 +59,7 @@ static char *forward_name = NULL; struct ECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR, NULL, NULL, NULL, {NULL}, 0}; struct variable no_indicator = {"no_indicator", &ecpg_no_indicator, 0, NULL}; -struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0}; +static struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0}; /* * Handle parsing errors and warnings diff --git a/src/interfaces/ecpg/preproc/ecpg_keywords.c b/src/interfaces/ecpg/preproc/ecpg_keywords.c index fb54d7b5c6..7f7041ffd8 100644 --- a/src/interfaces/ecpg/preproc/ecpg_keywords.c +++ b/src/interfaces/ecpg/preproc/ecpg_keywords.c @@ -16,10 +16,6 @@ #include "extern.h" #include "preproc.h" -/* Globals from keywords.c */ -extern const ScanKeyword SQLScanKeywords[]; -extern const int NumSQLScanKeywords; - /* * List of (keyword-name, keyword-token-value) pairs. * diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h index efe74c718e..dfc75bceec 100644 --- a/src/interfaces/ecpg/preproc/extern.h +++ b/src/interfaces/ecpg/preproc/extern.h @@ -58,6 +58,10 @@ extern struct when when_error, when_warn; extern struct ECPGstruct_member *struct_member_list[STRUCT_DEPTH]; +/* Globals from keywords.c */ +extern const ScanKeyword SQLScanKeywords[]; +extern const int NumSQLScanKeywords; + /* functions */ extern const char *get_dtype(enum ECPGdtype); diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c index 178a70427f..73d31c7471 100644 --- a/src/interfaces/ecpg/preproc/keywords.c +++ b/src/interfaces/ecpg/preproc/keywords.c @@ -17,6 +17,7 @@ #include "parser/keywords.h" #include "type.h" +#include "extern.h" #include "preproc.h" #define PG_KEYWORD(a,b,c) {a,b,c},