aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/variable.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2010-04-01 08:41:01 +0000
committerMichael Meskes <meskes@postgresql.org>2010-04-01 08:41:01 +0000
commitb2bddc2ff22f0c3d54671e43c67a2563deed7908 (patch)
tree6a546f350db3b70a737a95af175bb0c4851d0825 /src/interfaces/ecpg/preproc/variable.c
parent0189c42f31dbd22c2707f0b79a5728eb91f5d66e (diff)
downloadpostgresql-b2bddc2ff22f0c3d54671e43c67a2563deed7908.tar.gz
postgresql-b2bddc2ff22f0c3d54671e43c67a2563deed7908.zip
Applied Zoltan's patch to make ecpg spit out warnings if a local variable hides a global one with the same name.
Diffstat (limited to 'src/interfaces/ecpg/preproc/variable.c')
-rw-r--r--src/interfaces/ecpg/preproc/variable.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index 38832ee1d0a..d77c239806c 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.54 2010/03/09 11:09:45 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.55 2010/04/01 08:41:01 meskes Exp $ */
#include "postgres_fe.h"
@@ -22,7 +22,7 @@ new_variable(const char *name, struct ECPGtype * type, int brace_level)
}
static struct variable *
-find_struct_member(char *name, char *str, struct ECPGstruct_member * members, int brace_level)
+find_struct_member(const char *name, char *str, struct ECPGstruct_member * members, int brace_level)
{
char *next = strpbrk(++str, ".-["),
*end,
@@ -446,7 +446,8 @@ dump_variables(struct arguments * list, int mode)
/* Then the current element and its indicator */
ECPGdump_a_type(yyout, list->variable->name, list->variable->type,
list->indicator->name, list->indicator->type,
- NULL, NULL, make_str("0"), NULL, NULL);
+ NULL, NULL, make_str("0"), NULL, NULL,
+ list->variable->brace_level, list->indicator->brace_level);
/* Then release the list element. */
if (mode != 0)