diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-09-24 22:54:44 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-09-24 22:54:44 +0000 |
commit | 303e089df56251ad09e65f92df000e4ace6d82c1 (patch) | |
tree | 09a4bee24294652a8bdf35ba4ad62f17593ebb85 /src/backend/commands/functioncmds.c | |
parent | 5d9c6b18d30daa35e59c89f33c685e0133da0bf4 (diff) | |
download | postgresql-303e089df56251ad09e65f92df000e4ace6d82c1.tar.gz postgresql-303e089df56251ad09e65f92df000e4ace6d82c1.zip |
Clean up possibly-uninitialized-variable warnings reported by gcc 4.x.
Diffstat (limited to 'src/backend/commands/functioncmds.c')
-rw-r--r-- | src/backend/commands/functioncmds.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index c2bb4a2d9c8..a2a8f56e23c 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.67 2005/09/08 20:07:41 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.68 2005/09/24 22:54:36 tgl Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -158,6 +158,8 @@ examine_parameter_list(List *parameters, Oid languageOid, ListCell *x; int i; + *requiredResultType = InvalidOid; /* default result */ + inTypes = (Oid *) palloc(parameterCount * sizeof(Oid)); allTypes = (Datum *) palloc(parameterCount * sizeof(Datum)); paramModes = (Datum *) palloc(parameterCount * sizeof(Datum)); @@ -243,7 +245,6 @@ examine_parameter_list(List *parameters, Oid languageOid, { *allParameterTypes = NULL; *parameterModes = NULL; - *requiredResultType = InvalidOid; } if (have_names) @@ -383,16 +384,22 @@ compute_attributes_sql_style(List *options, if (as_item) *as = (List *) as_item->arg; else + { ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), errmsg("no function body specified"))); + *as = NIL; /* keep compiler quiet */ + } if (language_item) *language = strVal(language_item->arg); else + { ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), errmsg("no language specified"))); + *language = NULL; /* keep compiler quiet */ + } /* process optional items */ if (volatility_item) |