On 28.08.26 23:33, Peter Eisentraut wrote:
The new clang 23 has a new warning apparently enabled by default (at least by default in a PostgreSQL build) about set-but-unused static global variables: -Wunused-but-set-global. This triggers a few warnings in PostgreSQL code. See attached patches. The first four of these are genuine hits; these variables were never read from or the last reading use was removed some time ago. The last one in pg_ctl is about options that can be set from the command line on any platform but are only used on Windows. This seems kind of weird behavior; maybe in the future we should make those options error out on non-Windows, and then the variables wouldn't be uselessly set.
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.
