Re: Silencing the remaining clang 15 warnings

2022-09-21 Thread Tom Lane
HEAD and v15 now compile cleanly for me with clang 15.0.0, but I find that there's still work to do in the back branches: * There are new(?) -Wunused-but-set-variable warnings in every older branch, which we evidently cleaned up or rewrote at one point or another. I think this is definitely worth

Re: Silencing the remaining clang 15 warnings

2022-09-19 Thread Tom Lane
Thomas Munro writes: > On Tue, Sep 20, 2022 at 7:20 AM Tom Lane wrote: >> * xlog.c's AdvanceXLInsertBuffer has a local variable "npages" >> that is only read in the "#ifdef WAL_DEBUG" stanza at the >> bottom. Here I've done the rather ugly and brute-force thing >> of wrapping all the variable's

Re: Silencing the remaining clang 15 warnings

2022-09-19 Thread Thomas Munro
On Tue, Sep 20, 2022 at 7:20 AM Tom Lane wrote: > * With %pure-parser, Bison makes the "yynerrs" variable local > instead of static, and then if you don't use it clang notices > that it's set but never read. There doesn't seem to be a way > to persuade Bison not to emit the variable at all, so he