Re: pgsql: Allow extensions to add new backup targets. - Mailing list pgsql-committers

From Robert Haas
Subject Re: pgsql: Allow extensions to add new backup targets.
Date
Msg-id CA+TgmoY33KQy61JQREnnxKHnyiVnnarGQUFZqAhvbBdXSBMCqQ@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Allow extensions to add new backup targets.  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgsql: Allow extensions to add new backup targets.  (Michael Paquier <michael@paquier.xyz>)
Re: pgsql: Allow extensions to add new backup targets.  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-committers
On Wed, Mar 16, 2022 at 5:36 AM Michael Paquier <michael@paquier.xyz> wrote:
> I have noticed that this commit produces a warning when building with
> MSVC, as of the end of BaseBackupGetTargetHandle() when the target
> cannot be found.  I guess that you'd better add a fake return NULL to
> keep such compilers quiet about that, like that:
> +++ b/src/backend/replication/basebackup_target.c
> @@ -144,6 +144,9 @@ BaseBackupGetTargetHandle(char *target, char *target_detail)
>     ereport(ERROR,
>             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
>              errmsg("unrecognized target: \"%s\"", target)));
> +
> +   /* keep compiler quiet */
> +   return NULL;
>  }

Done.

It sucks that I keep missing this point. And it also sucks that we
have to have this kind of stuff. :-(

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Suppress compiler warnings.
Next
From: David Steele
Date:
Subject: Re: pgsql: Fix pg_basebackup with in-place tablespaces.