From 9a725f7b5cb7e8c8894ef121b49eff9c265245c8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 14 Feb 2018 16:06:49 -0500 Subject: Silence assorted "variable may be used uninitialized" warnings. All of these are false positives, but in each case a fair amount of analysis is needed to see that, and it's not too surprising that not all compilers are smart enough. (In particular, in the logtape.c case, a compiler lacking the knowledge provided by the Assert would almost surely complain, so that this warning will be seen in any non-assert build.) Some of these are of long standing while others are pretty recent, but it only seems worth fixing them in HEAD. Jaime Casanova, tweaked a bit by me Discussion: https://postgr.es/m/CAJGNTeMcYAMJdPAom52dppLMtF-UnEZi0dooj==75OEv1EoBZA@mail.gmail.com --- src/backend/access/transam/xloginsert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/access/transam/xloginsert.c') diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index de869e00ffe..5bea073a2b7 100644 --- a/src/backend/access/transam/xloginsert.c +++ b/src/backend/access/transam/xloginsert.c @@ -584,7 +584,7 @@ XLogRecordAssemble(RmgrId rmid, uint8 info, if (include_image) { Page page = regbuf->page; - uint16 compressed_len; + uint16 compressed_len = 0; /* * The page needs to be backed up, so calculate its hole length -- cgit v1.2.3