On Sun, Apr 5, 2020 at 3:31 PM Andres Freund <and...@anarazel.de> wrote: > The warnings don't seem too unreasonable. The compiler can't see that > the error_cb inside json_manifest_parse_failure() is not expected to > return. Probably worth adding a wrapper around the calls to > context->error_cb and mark that as noreturn.
Eh, how? The callback is declared as: typedef void (*json_manifest_error_callback)(JsonManifestParseContext *, char *fmt, ...) pg_attribute_printf(2, 3); I don't know of a way to create a wrapper around that, because of the variable argument list. We could change the callback to take va_list, I guess. Does it work for you to just add pg_attribute_noreturn() to this typedef, as in the attached? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
noreturn.patch
Description: Binary data