PATCH: nbklno in _hash_splitbucket unused (after ed9cc2b)

Started by Tomas Vondraalmost 11 years ago3 messages
#1Tomas Vondra
tomas.vondra@2ndquadrant.com
1 attachment(s)

Hi there,

the changes in _hash_splitbucket() made nblkno unused when compiled
without asserts. Attached is a simple fix to get rid of the warnings.

regards
Tomas

Attachments:

hashpage-nbklno.patchtext/x-patch; name=hashpage-nbklno.patchDownload
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index 9a77945..e32c4fc 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -764,7 +764,6 @@ _hash_splitbucket(Relation rel,
 				  uint32 lowmask)
 {
 	BlockNumber oblkno;
-	BlockNumber nblkno;
 	Buffer		obuf;
 	Page		opage;
 	Page		npage;
@@ -781,8 +780,7 @@ _hash_splitbucket(Relation rel,
 	opage = BufferGetPage(obuf);
 	oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
 
-	nblkno = start_nblkno;
-	Assert(nblkno == BufferGetBlockNumber(nbuf));
+	Assert(start_nblkno == BufferGetBlockNumber(nbuf));
 	npage = BufferGetPage(nbuf);
 
 	/* initialize the new bucket's primary page */
#2Petr Jelinek
petr@2ndquadrant.com
In reply to: Tomas Vondra (#1)
Re: PATCH: nbklno in _hash_splitbucket unused (after ed9cc2b)

On 05/04/15 01:03, Tomas Vondra wrote:

Hi there,

the changes in _hash_splitbucket() made nblkno unused when compiled
without asserts. Attached is a simple fix to get rid of the warnings.

This has been already fixed, see b7e1652d5 .

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Tomas Vondra
tomas.vondra@2ndquadrant.com
In reply to: Petr Jelinek (#2)
Re: PATCH: nbklno in _hash_splitbucket unused (after ed9cc2b)

On 04/05/15 01:26, Petr Jelinek wrote:

On 05/04/15 01:03, Tomas Vondra wrote:

Hi there,

the changes in _hash_splitbucket() made nblkno unused when compiled
without asserts. Attached is a simple fix to get rid of the warnings.

This has been already fixed, see b7e1652d5 .

D'oh! Sorry for the noise. Apparently my git repo was not properly
synced with upstream so I haven't seen the commit :-/

regards
Tomas

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers