pgsql: Apply project best practices to switches over enum values.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Apply project best practices to switches over enum values.
Дата
Msg-id E1iwE5S-0000B3-Ak@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Apply project best practices to switches over enum values.

In the wake of 1f3a02173, assorted buildfarm members were warning about
"control reaches end of non-void function" or the like.  Do what we've
done elsewhere: in place of a "default" switch case that will prevent
the compiler from warning about unhandled enum values, put a catchall
elog() after the switch.  And return a dummy value to satisfy compilers
that don't know elog() doesn't return.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4589c6a2a30faba53d0655a8e3a29b54d28bb6f6

Modified Files
--------------
src/backend/utils/adt/jsonapi.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Move some code from jsonapi.c to jsonfuncs.c.
Следующее
От: Thomas Munro
Дата:
Сообщение: pgsql: Remove dependency on HeapTuple from predicate locking functions.