Re: Fixing MSVC's inability to detect elog(ERROR) does not return

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fixing MSVC's inability to detect elog(ERROR) does not return
Date: 2025-07-24 01:47:07
Message-ID: CAApHDvrJ7ePYW8474s57Tk7BD4C2UZe6MkGrDSafz8V1XTdqSA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 24 Jul 2025 at 12:27, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Hmmm ... but you did check that in fact we can remove such known-dead
> code and not get a warning now?

Yes. The patch has a small temporary adjustment to
BaseBackupGetTargetHandle() to comment out the return. It compiles for
me using Visual Studio 2022 without any warnings. If I remove the
macro change, I get:

[598/2255] Compiling C object
src/backend/postgres_lib.a.p/backup_basebackup_target.c.obj
src\backend\backup\basebackup_target.c(150) : warning C4715:
'BaseBackupGetTargetHandle': not all control paths return a value

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2025-07-24 01:59:58 Re: index prefetching
Previous Message Michael Paquier 2025-07-24 01:43:12 Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX