Initialize 'recordXtime' to silence compiler warning.
authorHeikki Linnakangas <[email protected]>
Tue, 6 Jun 2023 17:30:53 +0000 (20:30 +0300)
committerHeikki Linnakangas <[email protected]>
Tue, 6 Jun 2023 17:30:53 +0000 (20:30 +0300)
In reality, recordXtime will always be set by the getRecordTimestamp
call, but the compiler doesn't necessarily see that.

Back-patch to all supported versions.

Author: Tristan Partin
Discussion: https://www.postgresql.org/message-id/CT5MN8E11U0M.1NYNCHXYUHY41@gonk

src/backend/access/transam/xlogrecovery.c

index 4883fcb512be2706b42427ce9a9a72ff3ac0d551..becc2bda62e633c013d7d11f4654fa78c5d27651 100644 (file)
@@ -2644,7 +2644,7 @@ recoveryStopsAfter(XLogReaderState *record)
        uint8           info;
        uint8           xact_info;
        uint8           rmid;
-       TimestampTz recordXtime;
+       TimestampTz recordXtime = 0;
 
        /*
         * Ignore recovery target settings when not in archive recovery (meaning