Re: Silencing the remaining clang 15 warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Silencing the remaining clang 15 warnings
Date
Msg-id 1081321.1663775084@sss.pgh.pa.us
Whole thread Raw
In response to Re: Silencing the remaining clang 15 warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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 fixing in the in-support
branches.  I'm a bit less sure if it's worth the trouble in the
out-of-support branches.

* The 9.2 and 9.3 branches spew boatloads of 'undeclared library function'
warnings about strlcpy() and related functions.  This is evidently
because 16fbac39f was only back-patched as far as 9.4.  There are
enough of these to be pretty annoying if you're trying to build those
branches with clang, so I think this is clearly justified for
back-patching into the older out-of-support branches, assuming that
the patch will work there.  (I see that 9.2 and 9.3 were still on the
prior version of autoconf, so it might not be an easy change.)

I also observe that 9.2 and 9.3 produce

float.c:1278:29: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648
[-Wimplicit-const-int-float-conversion]

This is because cbdb8b4c0 was only back-patched as far as 9.4.
However, I think that that would *not* be fit material for
back-patching into out-of-support branches, since our policy
for them is "no behavioral changes".

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: [PoC] Let libpq reject unexpected authentication requests
Next
From: Julien Rouhaud
Date:
Subject: Re: Is it time to drop fix-old-flex-code.pl?