Re: some dead code in functioncmds.c - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: some dead code in functioncmds.c
Date
Msg-id 162867790910300917m321dbfd7udaa440b293be872@mail.gmail.com
Whole thread Raw
In response to Re: some dead code in functioncmds.c  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: some dead code in functioncmds.c  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
2009/10/30 Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>:
> Pavel Stehule wrote:
>>       else
>>       {
>>               ereport(ERROR,
>>                               (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
>>                                errmsg("function result type must be specified")));
>>               /* Alternative possibility: default to RETURNS VOID */
>>
>> /* WHY FOLOWING LINES? */
>>               prorettype = VOIDOID;
>>               returnsSet = false;
>>       }
>
> To keep the compiler quiet about using the variables uninitialized. The
> compiler doesn't know that ereport(ERROR) never returns.
>

Should be similar code little bit commented?

Pavel

> --
>  Heikki Linnakangas
>  EnterpriseDB   http://www.enterprisedb.com
>


pgsql-hackers by date:

Previous
From: John Murtari
Date:
Subject: Patch set under development to add usage reporting.
Next
From: Jeff Davis
Date:
Subject: Re: Syntax for partitioning