]> granicus.if.org Git - postgresql/commitdiff
Silence compiler warning about variable being used uninitialized.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 20 Nov 2014 17:16:12 +0000 (19:16 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 20 Nov 2014 17:17:19 +0000 (19:17 +0200)
It's a false positive - the variable is only used when 'onleft' is true,
and it is initialized in that case. But the compiler doesn't necessarily
see that.

src/backend/access/nbtree/nbtxlog.c

index 52aef9b9836b41fce3bb0063539fe90babf33076..416c5fc6b306c9a3735c2bdee6d1c7250ed266be 100644 (file)
@@ -269,7 +269,7 @@ btree_xlog_split(bool onleft, bool isroot, XLogReaderState *record)
                Page            lpage = (Page) BufferGetPage(lbuf);
                BTPageOpaque lopaque = (BTPageOpaque) PageGetSpecialPointer(lpage);
                OffsetNumber off;
-               Item            newitem;
+               Item            newitem = NULL;
                Size            newitemsz = 0;
                Page            newlpage;
                OffsetNumber leftoff;