Initialize 'recordXtime' to silence compiler warning.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 6 Jun 2023 17:30:53 +0000 (20:30 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 6 Jun 2023 17:31:09 +0000 (20:31 +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 a0e984aae04d21ea13db09c57ad8613c366d3f9d..166f7b7b79399c58c6fe677bd46805cd14367d88 100644 (file)
@@ -2621,7 +2621,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