cc1: warnings being treated as errors
transsup.c: In function `TransBlockGetLastTransactionIdStatus':
transsup.c:122: warning: unsigned value >= 0 is always 1
gmake[3]: *** [transsup.o] Error 1
...
This commit is contained in:
Vadim B. Mikheev 1996-12-14 05:20:39 +00:00
parent b555822fed
commit 02ba3cf871
1 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.6 1996/11/05 11:12:30 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.7 1996/12/14 05:20:39 vadim Exp $
* *
* NOTES * NOTES
* This file contains support functions for the high * This file contains support functions for the high
@ -119,8 +119,8 @@ TransBlockGetLastTransactionIdStatus(Block tblock,
* ---------------- * ----------------
*/ */
maxIndex = TP_NumXidStatusPerBlock; maxIndex = TP_NumXidStatusPerBlock;
for (index = maxIndex-1; index>=0; index--) { for (index = maxIndex; index > 0; index--) {
offset = BitIndexOf(index); offset = BitIndexOf(index-1);
bit1 = ((bits8) BitArrayBitIsSet((BitArray) tblock, offset++)) << 1; bit1 = ((bits8) BitArrayBitIsSet((BitArray) tblock, offset++)) << 1;
bit2 = (bits8) BitArrayBitIsSet((BitArray) tblock, offset); bit2 = (bits8) BitArrayBitIsSet((BitArray) tblock, offset);
@ -135,7 +135,7 @@ TransBlockGetLastTransactionIdStatus(Block tblock,
if (xstatus != XID_INPROGRESS) { if (xstatus != XID_INPROGRESS) {
if (returnXidP != NULL) { if (returnXidP != NULL) {
TransactionIdStore(baseXid, returnXidP); TransactionIdStore(baseXid, returnXidP);
TransactionIdAdd(returnXidP, index); TransactionIdAdd(returnXidP, index - 1);
} }
break; break;
} }