Re: Missing errcode() in ereport
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Amit Kapila <amit.kapila16@gmail.com>,
Michael Paquier <michael@paquier.xyz>,
Julien Rouhaud <rjuju123@gmail.com>,
Masahiko Sawada <masahiko.sawada@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-03-25T16:18:22Z
Lists: pgsql-hackers
I wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
>> I think this caused anole to say:
>> "reloptions.c", line 1362: error #2042: operand types are incompatible
>> ("void" and "int")
>> errdetail_internal("%s", _(optenum->detailmsg)) : 0));
> Yeah, I was just looking at that :-(
> We could revert the change to have these functions return void,
> or we could run around and change the places with this usage
> pattern to use "(void) 0" instead of just "0". The latter would
> be somewhat painful if only minority compilers warn, though.
> Also, I don't think that having to change ereport usage was part
> of the agreed-to plan here ... so I'm leaning to the former.
Done that way.
regards, tom lane
Commits
-
Go back to returning int from ereport auxiliary functions.
- bda6dedbea59 13.0 landed
-
Improve the internal implementation of ereport().
- 17a28b03645e 13.0 landed
-
Re-implement the ereport() macro using __VA_ARGS__.
- e3a87b4991cc 13.0 landed
- a86715451653 12.3 landed
-
Add missing errcode() in a few ereport calls.
- 6bdfe428d399 9.5.22 landed
- fe27ce1c136d 9.6.18 landed
- 569f9354bb43 10.13 landed
- 18c41cb6b714 11.8 landed
- e37824136f06 12.3 landed
- b4f140869f5d 13.0 landed