Re: new clang warnings about unused global variables

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andreas Karlsson <andreas(at)proxel(dot)se>
Subject: Re: new clang warnings about unused global variables
Date: 2026-09-07 16:14:19
Message-ID: f31adc8f-e84d-460c-af6e-beaf6236170c@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03.09.26 15:52, Tom Lane wrote:
> Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
>> I sense that nobody is going to have issues with this. Any objections
>> to backpatching this? I suspect that over time many more people are
>> going to run into this, so keeping the backbranches warning-free seems
>> sensible.
>
> Agreed, we usually like to keep the back branches warning-free too.
>
> But I concur with Andreas that 0005 looks a bit half-baked.
> Maybe that's the right amount of effort for the back branches,
> but something else should happen in HEAD.

Right. Here is another patch at the end (0006) that I propose for
master only that makes using unsupported options an error. Some
Windows-only options already behaved that way, so this just makes the
rest consistent.

Attachment Content-Type Size
v2-0001-Remove-unused-global-variable-xlog.c.patch text/plain 3.6 KB
v2-0002-Remove-unused-global-variable-test_resowner.patch text/plain 2.1 KB
v2-0003-Remove-unused-global-variable-pg_dump.patch text/plain 1.4 KB
v2-0004-Remove-unused-global-variable-postmaster.patch text/plain 1.3 KB
v2-0005-Silence-warnings-about-unused-global-variables-pg.patch text/plain 2.0 KB
v2-0006-pg_ctl-Error-out-on-Windows-only-options-elsewher.patch text/plain 4.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2026-09-07 16:29:25 Re: Speed up COPY FROM text/CSV parsing using SIMD
Previous Message Heikki Linnakangas 2026-09-07 15:57:34 Re: Offline data checksum changes can cause incorrect checksum state on standbys