Fix compiler warning in unistr function
authorDavid Rowley <drowley@postgresql.org>
Tue, 30 Mar 2021 07:28:09 +0000 (20:28 +1300)
committerDavid Rowley <drowley@postgresql.org>
Tue, 30 Mar 2021 07:28:09 +0000 (20:28 +1300)
Some compilers are not aware that elog/ereport ERROR does not return.

src/backend/utils/adt/varlena.c

index efc74e8f2d70fb46ac57046eed88dfd3d8eb2003..0c6e5f24ba1f94b3f55a0ca5f65755235e1d1966 100644 (file)
@@ -6589,4 +6589,5 @@ invalid_pair:
        ereport(ERROR,
                        (errcode(ERRCODE_SYNTAX_ERROR),
                         errmsg("invalid Unicode surrogate pair")));
+       PG_RETURN_NULL();                       /* keep compiler quiet */
 }