| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Apply project best practices to switches over enum values. |
| Date: | 2020-01-27 23:46:34 |
| Message-ID: | E1iwE5S-0000B3-Ak@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2020-01-28 00:46:51 | pgsql: Remove dependency on HeapTuple from predicate locking functions. |
| Previous Message | Robert Haas | 2020-01-27 16:24:29 | pgsql: Move some code from jsonapi.c to jsonfuncs.c. |