Re: Warning in geqo_main.c from clang 13

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Warning in geqo_main.c from clang 13
Date: 2022-01-22 22:34:16
Message-ID: 1497684.1642890856@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
>> Clang 13 on my machine and peripatus (but not Apple clang 13 on eg
>> sifika, I'm still confused about Apple's versioning but I think that's
>> really llvm 12-based) warns:
>> geqo_main.c:86:8: warning: variable 'edge_failures' set but not used
>> [-Wunused-but-set-variable]
>> Here's one way to silence it.

> I'm kind of inclined to just drop the edge_failures recording/logging
> altogether, rather than make that rats-nest of #ifdefs even worse.
> It's not like anyone has cared about that number in the last decade
> or two.

We're starting to see more buildfarm animals producing this warning,
so I took another look, and thought of a slightly less invasive way to
silence it. I confirmed this works with clang 13.0.0 on Fedora 35.

regards, tom lane

Attachment Content-Type Size
silence-clang-warning-v2.patch text/x-diff 753 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Glukhov 2022-01-23 00:24:33 Re: Collecting statistics about contents of JSONB columns
Previous Message Kenaniah Cerny 2022-01-22 22:33:59 Re: Parameter for planner estimate of recursive queries