]> granicus.if.org Git - postgresql/commitdiff
Suppress uninitialized-variable warning in new checksum code.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 22 Mar 2013 16:27:50 +0000 (12:27 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 22 Mar 2013 16:27:50 +0000 (12:27 -0400)
Some compilers understand that this coding is safe, and some don't.

src/backend/storage/page/bufpage.c

index 81cdc6547a3ab90ff48eb570e1429f8c33256695..326d3de88895c4eaa98bfa0e6bca729a707be01c 100644 (file)
@@ -84,7 +84,7 @@ PageIsVerified(Page page, BlockNumber blkno)
        bool            checksum_failure = false;
        bool            header_sane = false;
        bool            all_zeroes = false;
-       uint16          checksum;
+       uint16          checksum = 0;
 
        /*
         * Don't verify page data unless the page passes basic non-zero test