Re: libpq support for NegotiateProtocolVersion

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Jacob Champion <jchampion(at)timescale(dot)com>
Subject: Re: libpq support for NegotiateProtocolVersion
Date: 2025-04-03 11:55:09
Message-ID: CAEudQAqG+nBgbdPfk9LxGMX5i6yxDKGNfpP6JQZHGF4fWEZ7+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

Per Coverity.

CID 1596094: (#1 of 1): Structurally dead code (UNREACHABLE)
unreachable: Since the loop increment i++; is unreachable, the loop body
will never execute more than once.

The code of the function *pqGetNegotiateProtocolVersion3* is a little
confusing.

I believe that the Coverity alert is valid.
The function never returns 0.

best regards,
Ranier Vilela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2025-04-03 12:01:20 Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding
Previous Message Tomas Vondra 2025-04-03 11:52:04 Re: Draft for basic NUMA observability