From d93f209f483f006534ae543667a1254b6fdec183 Mon Sep 17 00:00:00 2001
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Thu, 8 Mar 2012 11:10:02 +0200
Subject: [PATCH] Silence warning about unused variable, when building without
 assertions.

---
 src/backend/access/transam/xlog.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 8bbca613f26..18fc23286aa 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1117,7 +1117,6 @@ begin:;
 	 */
 	if (isLogSwitch)
 	{
-		XLogCtlWrite *Write = &XLogCtl->Write;
 		XLogwrtRqst FlushRqst;
 		XLogRecPtr	OldSegEnd;
 
@@ -1140,7 +1139,7 @@ begin:;
 
 		/* There should be no unwritten data */
 		curridx = Insert->curridx;
-		Assert(curridx == Write->curridx);
+		Assert(curridx == XLogCtl->Write.curridx);
 
 		/* Compute end address of old segment */
 		OldSegEnd = XLogCtl->xlblocks[curridx];
-- 
GitLab