1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Silence minor compiler warnings.

Ensure that ClassifyUtilityCommandAsReadOnly() has defined behavior
even if TransactionStmt.kind has a value that's not one of the
declared values for its enum.

Suppress warnings from compilers that don't know that elog(ERROR)
doesn't return, in ClassifyUtilityCommandAsReadOnly() and
jsonb_set_lax().

Per Coverity and buildfarm.
This commit is contained in:
Tom Lane
2020-01-19 16:04:36 -05:00
parent 7aaefadaac
commit 9c679a08f0
2 changed files with 7 additions and 3 deletions

View File

@ -4456,6 +4456,7 @@ jsonb_set_lax(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("need delete_key, return_target, use_json_null, or raise_exception")));
return (Datum) 0; /* silence stupider compilers */
}
}