Re: Avoid unused value (src/fe_utils/print.c)

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: Avoid unused value (src/fe_utils/print.c)
Дата
Msg-id b5aba8e3-911c-6fa0-eb13-bb2a6f2a0537@gmail.com
обсуждение исходный текст
Ответ на Re: Avoid unused value (src/fe_utils/print.c)  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Avoid unused value (src/fe_utils/print.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Re: Avoid unused value (src/fe_utils/print.c)  (Karina Litskevich <litskevichkarina@gmail.com>)
Список pgsql-hackers
Hi Michael,

04.06.2023 01:42, Michael Paquier wrote:
> On Sat, Jun 03, 2023 at 03:00:01PM +0300, Alexander Lakhin wrote:
>> Clang' scan-build detects 58 errors "Dead assignment", including that one.
>> Maybe it would be more sensible to eliminate all errors of this class?
> Depends on if this makes any code changed a bit easier to understand I
> guess, so that would be a case-by-case analysis.  Saying that, the
> proposed patch seems right while it makes slightly easier to
> understand the footer print part.

It also aligns the code with print_unaligned_vertical(), but I can't see why
need_recordsep = true;
is a no-op here (scan-build dislikes only need_recordsep = false;).
I suspect that removing that line will change the behaviour in cases when
need_recordsep = false after the loop "print cells" and the loop
"for (footers)" is executed.

Best regards,
Alexander



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kirk Wolak
Дата:
Сообщение: Re: [BUG] pg_dump does not properly deal with BEGIN ATOMIC function
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Improve join_search_one_level readibilty (one line change)