diff options
author | Michael Meskes <meskes@postgresql.org> | 2009-09-03 09:59:20 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2009-09-03 09:59:20 +0000 |
commit | 2720c57005cf006d9a1a5bf82b0f1ed6e35b3151 (patch) | |
tree | 5f264b9c01463c2254d329b8574c55b2ddb1c879 /src/interfaces/ecpg/preproc | |
parent | fe35c8e145e1c970dcae1f7df840762a753f6ee2 (diff) |
Removed some variables no longer needed.
Diffstat (limited to 'src/interfaces/ecpg/preproc')
-rw-r--r-- | src/interfaces/ecpg/preproc/type.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index 0465762f8d1..a277bd0e50c 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.84 2009/08/07 10:51:20 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.85 2009/09/03 09:59:20 meskes Exp $ */ #include "postgres_fe.h" @@ -228,7 +228,7 @@ static void ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type, char *varcharsize, char *arrsiz, const char *siz, const char *prefix, int); static void ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz, - struct ECPGtype * type, struct ECPGtype * ind_type, const char *offset, const char *prefix, const char *ind_prefix); + struct ECPGtype * type, struct ECPGtype * ind_type, const char *prefix, const char *ind_prefix); void ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, @@ -254,7 +254,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, type->size, type->u.element, (ind_type == NULL) ? NULL : ((ind_type->type == ECPGt_NO_INDICATOR) ? ind_type : ind_type->u.element), - NULL, prefix, ind_prefix); + prefix, ind_prefix); break; default: if (!IS_SIMPLE_TYPE(type->u.element->type)) @@ -280,7 +280,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, if (indicator_set && ind_type->type != ECPGt_struct) mmerror(INDICATOR_NOT_STRUCT, ET_FATAL, "indicator for struct has to be a struct"); - ECPGdump_a_struct(o, name, ind_name, make_str("1"), type, ind_type, NULL, prefix, ind_prefix); + ECPGdump_a_struct(o, name, ind_name, make_str("1"), type, ind_type, prefix, ind_prefix); break; case ECPGt_union: /* cannot dump a complete union */ base_yyerror("type of union has to be specified"); @@ -459,7 +459,7 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type, /* Penetrate a struct and dump the contents. */ static void -ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz, struct ECPGtype * type, struct ECPGtype * ind_type, const char *offsetarg, const char *prefix, const char *ind_prefix) +ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz, struct ECPGtype * type, struct ECPGtype * ind_type, const char *prefix, const char *ind_prefix) { /* * If offset is NULL, then this is the first recursive level. If not then @@ -467,18 +467,8 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz, */ struct ECPGstruct_member *p, *ind_p = NULL; - char obuf[BUFSIZ]; char pbuf[BUFSIZ], ind_pbuf[BUFSIZ]; - const char *offset; - - if (offsetarg == NULL) - { - sprintf(obuf, "sizeof(%s)", name); - offset = obuf; - } - else - offset = offsetarg; if (atoi(arrsiz) == 1) sprintf(pbuf, "%s%s.", prefix ? prefix : "", name); |