From: Tom Lane Date: Sun, 7 Nov 2021 17:18:18 +0000 (-0500) Subject: Silence uninitialized-variable warning. X-Git-Url: http://git.postgresql.org/gitweb/static/developers.postgresql.org?a=commitdiff_plain;h=c3ec4f8fe867807613c08fe16789434ab1a74a15;p=users%2Frhaas%2Fpostgres.git Silence uninitialized-variable warning. Quite a few buildfarm animals are warning about this, and lapwing is actually failing (because -Werror). It's a false positive AFAICS, so no need to do more than zero the variable to start with. Discussion: https://postgr.es/m/YYXJnUxgw9dZKxlX@paquier.xyz --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 7b1b3e802b..5cda30836f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -12109,6 +12109,9 @@ read_backup_label(XLogRecPtr *checkPointLoc, TimeLineID *backupLabelTLI, uint32 hi, lo; + /* suppress possible uninitialized-variable warnings */ + *checkPointLoc = InvalidXLogRecPtr; + *backupLabelTLI = 0; *backupEndRequired = false; *backupFromStandby = false;