1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-05 09:19:17 +03:00

Fix potential for compiler warning in GlobalVisTestFor().

In d9d8aa9bb9a I added a defensive NULL assignment to protect against a
not-too-smart compiler warning about unitialized variable use after the
switch. Unfortunately I only did so on master and forgot to adjust that for
14.

Stephen noticed that there actually is a compiler warning :(.

Reported-By: Stephen Frost <sfrost@snowman.net>
Discussion: https://postgr.es/m/20210827224639.GX17906@tamriel.snowman.net
This commit is contained in:
Andres Freund 2021-09-13 16:50:10 -07:00
parent 896a0c44f9
commit 0d0bbee5e3

View File

@ -4027,7 +4027,7 @@ DisplayXidCache(void)
GlobalVisState *
GlobalVisTestFor(Relation rel)
{
GlobalVisState *state;
GlobalVisState *state = NULL;
/* XXX: we should assert that a snapshot is pushed or registered */
Assert(RecentXmin);