Skip to content

Commit 0d0bbee

Browse files
committed
Fix potential for compiler warning in GlobalVisTestFor().
In d9d8aa9 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
1 parent 896a0c4 commit 0d0bbee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/storage/ipc/procarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4027,7 +4027,7 @@ DisplayXidCache(void)
40274027
GlobalVisState *
40284028
GlobalVisTestFor(Relation rel)
40294029
{
4030-
GlobalVisState *state;
4030+
GlobalVisState *state = NULL;
40314031

40324032
/* XXX: we should assert that a snapshot is pushed or registered */
40334033
Assert(RecentXmin);

0 commit comments

Comments
 (0)