summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2021-02-16 13:10:37 +1300
committerThomas Munro <tmunro@postgresql.org>2021-02-16 13:17:07 +1300
commit618d139f82d4222df796e989de3c4c4de0359d7b (patch)
tree68465f456dc1e16b3be3121ba7086bb88c256a71 /src
parent09a3b19e38ee09ce1f12cee9b9537ae66d729ead (diff)
Fix compiler warning in back branches (9.6, 10).
Back-patch a tiny bit of commit fbb2e9a0 into 9.6 and 10, to silence an uninitialized variable warning from GCC 10.2. Seen on buildfarm member handfish, and my own development workflow where I like to use -Werror. Discussion: https://postgr.es/m/CA%2BhUKGJRcwvK86Uf5t-FrTekZjqHtpv3u%3D3MuBg8Zw8R933Mqg%40mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/misc/guc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index ae4be7724e3..2974ca6dd82 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -9325,6 +9325,8 @@ RestoreGUCState(void *gucstate)
if (varsourcefile[0])
read_gucstate_binary(&srcptr, srcend,
&varsourceline, sizeof(varsourceline));
+ else
+ varsourceline = 0;
read_gucstate_binary(&srcptr, srcend,
&varsource, sizeof(varsource));
read_gucstate_binary(&srcptr, srcend,