]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
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:32:31 +0000 (20:32 +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/xlog.c

index a1ceded9e092f40e2559a020bd9675856a428edb..9c5d6058b4662feaf2e8ae8dbe1e619092ee4c73 100644 (file)
@@ -5891,7 +5891,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