Re: Silencing the remaining clang 15 warnings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Silencing the remaining clang 15 warnings
Дата
Msg-id 1081321.1663775084@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Silencing the remaining clang 15 warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: [PoC] Let libpq reject unexpected authentication requests
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Is it time to drop fix-old-flex-code.pl?