Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit64a62eb

Browse files
committed
Use int instead of size_t in procarray.c.
All size_t variables declared in procarray.c are actually int ones.Let's use int instead of size_t for those variables. Which wouldreduce Wsign-compare compiler warnings.Back-patch to v14 where commit941697c added size_t variablesin procarray.c, to make future back-patching easy thoughthis patch is classified as refactoring only.Reported-by: Ranier VilelaAuthor: Ranier Vilela, Aleksander Alekseevhttps://postgr.es/m/CAEudQAqyoTZC670xWi6w-Oe2_Bk1bfu2JzXz6xRfiOUzm7xbyQ@mail.gmail.com
1 parent0c39c29 commit64a62eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/backend/storage/ipc/procarray.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ ProcArrayEndTransaction(PGPROC *proc, TransactionId latestXid)
714714
staticinlinevoid
715715
ProcArrayEndTransactionInternal(PGPROC*proc,TransactionIdlatestXid)
716716
{
717-
size_tpgxactoff=proc->pgxactoff;
717+
intpgxactoff=proc->pgxactoff;
718718

719719
/*
720720
* Note: we need exclusive lock here because we're going to change other
@@ -886,7 +886,7 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
886886
void
887887
ProcArrayClearTransaction(PGPROC*proc)
888888
{
889-
size_tpgxactoff;
889+
intpgxactoff;
890890

891891
/*
892892
* Currently we need to lock ProcArrayLock exclusively here, as we
@@ -1366,7 +1366,7 @@ TransactionIdIsInProgress(TransactionId xid)
13661366
TransactionIdtopxid;
13671367
TransactionIdlatestCompletedXid;
13681368
intmypgxactoff;
1369-
size_tnumProcs;
1369+
intnumProcs;
13701370
intj;
13711371

13721372
/*
@@ -1443,7 +1443,7 @@ TransactionIdIsInProgress(TransactionId xid)
14431443
/* No shortcuts, gotta grovel through the array */
14441444
mypgxactoff=MyProc->pgxactoff;
14451445
numProcs=arrayP->numProcs;
1446-
for (size_tpgxactoff=0;pgxactoff<numProcs;pgxactoff++)
1446+
for (intpgxactoff=0;pgxactoff<numProcs;pgxactoff++)
14471447
{
14481448
intpgprocno;
14491449
PGPROC*proc;
@@ -2209,7 +2209,7 @@ GetSnapshotData(Snapshot snapshot)
22092209
TransactionId*other_xids=ProcGlobal->xids;
22102210
TransactionIdxmin;
22112211
TransactionIdxmax;
2212-
size_tcount=0;
2212+
intcount=0;
22132213
intsubcount=0;
22142214
boolsuboverflowed= false;
22152215
FullTransactionIdlatest_completed;
@@ -2291,7 +2291,7 @@ GetSnapshotData(Snapshot snapshot)
22912291

22922292
if (!snapshot->takenDuringRecovery)
22932293
{
2294-
size_tnumProcs=arrayP->numProcs;
2294+
intnumProcs=arrayP->numProcs;
22952295
TransactionId*xip=snapshot->xip;
22962296
int*pgprocnos=arrayP->pgprocnos;
22972297
XidCacheStatus*subxidStates=ProcGlobal->subxidStates;
@@ -2301,7 +2301,7 @@ GetSnapshotData(Snapshot snapshot)
23012301
* First collect set of pgxactoff/xids that need to be included in the
23022302
* snapshot.
23032303
*/
2304-
for (size_tpgxactoff=0;pgxactoff<numProcs;pgxactoff++)
2304+
for (intpgxactoff=0;pgxactoff<numProcs;pgxactoff++)
23052305
{
23062306
/* Fetch xid just once - see GetNewTransactionId */
23072307
TransactionIdxid=UINT32_ACCESS_ONCE(other_xids[pgxactoff]);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp