Re: backup manifests

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: David Steele <david(at)pgmasters(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, Tels <nospam-pg-abuse(at)bloodgate(dot)com>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>
Subject: Re: backup manifests
Date: 2020-04-23 12:57:39
Message-ID: CA+Tgmoa4XLHLm7V3unSOkC-kVaDkE4W64fhR-GraXVaTfM83mA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Apr 5, 2020 at 3:31 PM Andres Freund <andres(at)anarazel(dot)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

Attachment Content-Type Size
noreturn.patch application/octet-stream 655 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-04-23 13:00:21 Re: PG compilation error with Visual Studio 2015/2017/2019
Previous Message Tomas Vondra 2020-04-23 12:47:00 Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays