Re: pgsql: Remove dependency on HeapTuple from predicate locking functions.
От | Tom Lane |
---|---|
Тема | Re: pgsql: Remove dependency on HeapTuple from predicate locking functions. |
Дата | |
Msg-id | 7230.1580223936@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql: Remove dependency on HeapTuple from predicate locking functions. (Thomas Munro <thomas.munro@gmail.com>) |
Ответы |
Re: pgsql: Remove dependency on HeapTuple from predicate locking functions.
|
Список | pgsql-committers |
Thomas Munro <thomas.munro@gmail.com> writes: > On Tue, Jan 28, 2020 at 6:59 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> anole's not terribly pleased with this: >> "heapam.c", line 9137: error #2118: a void function may not return a value >> return CheckForSerializableConflictOut(relation, xid, snapshot); > Thanks. I pushed a fix. > Wow, HP C spits out a lot of warnings. It's pretty noisy, and most of 'em are useless :-(. But as for this particular complaint, I don't really understand why gcc lets it slide. The C99 standard is not exactly ambiguous about this: 6.8.6.4 The return statement Constraints [#1] A return statement with an expression shall not appear in a function whose return type is void. A return statement without an expression shall only appear in a function whose return type is void. There is absolutely no question that the original coding is illegal per spec, and it isn't even a particularly useful shorthand; so why can't we get even a warning about it? regards, tom lane
В списке pgsql-committers по дате отправления: