git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c03216)
Silence compiler warning about variable being used uninitialized.
2014年11月20日 17:16:12 +0000 (19:16 +0200)
2014年11月20日 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.


diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend/access/nbtree/nbtxlog.c
index 52aef9b9836b41fce3bb0063539fe90babf33076..416c5fc6b306c9a3735c2bdee6d1c7250ed266be 100644 (file)
--- a/src/backend/access/nbtree/nbtxlog.c
+++ b/src/backend/access/nbtree/nbtxlog.c
@@ -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;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /