Re: Fix warning: ‘startpos’ may be used uninitialized in function ‘results_differ’

Imran Zaheer <imran.zhir@gmail.com>

From: Imran Zaheer <imran.zhir@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: m.litsarev@postgrespro.ru, Ewan Young <kdbase.hack@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-06-18T06:26:56Z
Lists: pgsql-hackers
Hi

I also reported [1] some similar warnings emitted from the old gcc
some time ago. Do you think this should be worth getting fixed?


Thanks
Imran Zaheer


[1]: https://www.postgresql.org/message-id/flat/CA+UBfa=H9RQdZ8Tof+SF7gMC-FTrsJ_w=Vnxs4OiBAaB_go+tQ@mail.gmail.com<span
class="sewitjdq8nk9iqz"></span>


On Wed, Jun 17, 2026 at 11:03 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>
> On 16/06/2026 18:22, m.litsarev@postgrespro.ru wrote:
> >> ...I propose the attached, to bail out if the fopen() fails. (As the
> >> original patch, this looks a lot smaller with "diff -w")
> > I agree the v2 patch is even better.
>
> Committed, thanks!
>
> - Heikki
>
>
>



Commits

  1. Silence uninitialized variable warning with some compiler versions

  2. pg_regress: Include diffs in TAP output