Re: new clang warnings about unused global variables

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, 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-11-26 09:39:00
Message-ID: 9b67806d-0f44-4e59-9d22-0d761f31e907@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25/11/2026 17:29, Peter Eisentraut wrote:
>> See the sketch solution in the attached patch.
>
> Maybe for cases like this it would be easier to stick a pg_attribute_unused() on
> the variable declarations.  Otherwise, it might get too annoying to maintain all
> these #ifdef groups consistently.

Ok. I never thought that Clang supports GCC 4 and this compiler directive. New
patch attached.

--
regards, Andrei Lepikhov,
pgEdge

Attachment Content-Type Size
v1-0001-Silence-Wunused-but-set-global-warnings-with-libe.patch text/plain 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-11-26 09:41:00 Re: test: avoid redundant standby catchup in 049_wait_for_lsn
Previous Message Hayato Kuroda (Fujitsu) 2026-11-26 09:36:39 RE: Use WALReadFromBuffers in more places