Suppress uninitialized-variable warning in guc.c.
authorTom Lane <[email protected]>
Mon, 13 Dec 2021 04:44:44 +0000 (23:44 -0500)
committerTom Lane <[email protected]>
Mon, 13 Dec 2021 04:44:44 +0000 (23:44 -0500)
Back-patch 26812bcaa into 9.5, to suppress one more warning
in out-of-support branches.  (Doesn't appear to be needed
before 9.5.)

Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com

src/backend/utils/misc/guc.c

index 76e0e171c893ae0cbf4fcfa23ae56483c600aee2..6662f4be70703933027ea27c2c9684d368fe2961 100644 (file)
@@ -9124,6 +9124,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,