Re: Silencing the remaining clang 15 warnings
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-09-21T15:44:44Z
Lists: 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
Commits
-
Fix configure's AC_CHECK_DECLS tests to work correctly with clang.
- f6ce9cee6207 9.3 (unreleased) landed
- b8464d2f5da0 9.2 (unreleased) landed
-
Suppress more variable-set-but-not-used warnings from clang 15.
- db8e36682d95 13.9 landed
- c705646b751e 9.6 (unreleased) landed
- bf216123446c 9.3 (unreleased) landed
- bb8dbc9f2512 11.18 landed
- 9c69e2640fa8 10.23 landed
- 9a2267bcfc7d 12.13 landed
- 96e595124ee8 9.5 (unreleased) landed
- 88c947cb5261 14.6 landed
- 850cb88e4b60 9.2 (unreleased) landed
- 3c5a33a52e3a 9.4 (unreleased) landed
-
Suppress variable-set-but-not-used warnings from clang 15.
- f38a0bde2177 12.13 landed
- ca3b730baa13 13.9 landed
- b7d9b0c2667e 15.0 landed
- 85c077f9e022 9.6 (unreleased) landed
- 760308704378 10.23 landed
- 6ae8aee0b67b 11.18 landed
- 612e7966127e 9.5 (unreleased) landed
- 2e124d857a64 14.6 landed
- 152c9f7b8f01 16.0 landed