From 0f59b0a7fee4f69d9632c732ba4dc4bb220fd401 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 28 Dec 2024 11:00:24 +0100 Subject: [PATCH 2/4] Add another pg_noreturn The previous change revealed a compiler warning about possibly uninitialized variables, which this fixes. --- src/common/parse_manifest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/parse_manifest.c b/src/common/parse_manifest.c index a3896eaebe2..b3406b40d48 100644 --- a/src/common/parse_manifest.c +++ b/src/common/parse_manifest.c @@ -114,8 +114,8 @@ static void json_manifest_finalize_wal_range(JsonManifestParseState *parse); static void verify_manifest_checksum(JsonManifestParseState *parse, const char *buffer, size_t size, pg_cryptohash_ctx *incr_ctx); -static void json_manifest_parse_failure(JsonManifestParseContext *context, - char *msg); +pg_noreturn static void json_manifest_parse_failure(JsonManifestParseContext *context, + char *msg); static int hexdecode_char(char c); static bool hexdecode_string(uint8 *result, char *input, int nbytes); @@ -889,6 +889,7 @@ static void json_manifest_parse_failure(JsonManifestParseContext *context, char *msg) { context->error_cb(context, "could not parse backup manifest: %s", msg); + pg_unreachable(); } /* -- 2.47.1