mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
Avoiding
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:
parent
b555822fed
commit
02ba3cf871
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user