From: Thomas Munro Date: Tue, 16 Feb 2021 00:10:37 +0000 (+1300) Subject: Fix compiler warning in back branches (9.6, 10). X-Git-Tag: REL_10_17~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26812bcaa;p=thirdparty%2Fpostgresql.git 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 --- diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 9f47bd0aea9..9e26cbd18e3 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -9437,6 +9437,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,