aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2021-09-13 16:50:10 -0700
committerAndres Freund <andres@anarazel.de>2021-09-13 16:50:10 -0700
commit0d0bbee5e3ee2eabe3a1f6081cbc4226520764c0 (patch)
treefe9022c12d3556db14ddbdb2ac105fd1fd87852d /src
parent896a0c44f93b0b449fdf7e6c3973deab5fdfed4f (diff)
downloadpostgresql-0d0bbee5e3ee2eabe3a1f6081cbc4226520764c0.tar.gz
postgresql-0d0bbee5e3ee2eabe3a1f6081cbc4226520764c0.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/ipc/procarray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index aa3e1419a9e..739b4cd51d0 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -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);