Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8c12b47

Browse files
committed
c89 compat and fix few warnings
1 parent 33261a3 commit 8c12b47

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/commit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ MtmTwoPhaseCommit()
207207
char gid[GIDSIZE];
208208
mtm_msg messages[MTM_MAX_NODES];
209209
int n_messages;
210+
int i;
210211

211212
if (!MtmTx.contains_persistent_ddl && !MtmTx.contains_dml)
212213
return false;
@@ -264,7 +265,7 @@ MtmTwoPhaseCommit()
264265
gather(participants, messages, &n_messages);
265266
dmq_stream_unsubscribe(stream);
266267

267-
for (int i = 0; i < n_messages; i++)
268+
for (i = 0; i < n_messages; i++)
268269
{
269270
MtmMessageCode status = pq_getmsgbyte(messages[i].message);
270271

@@ -349,6 +350,7 @@ MtmExplicitPrepare(char *gid)
349350
char stream[DMQ_NAME_MAXLEN];
350351
mtm_msg messages[MTM_MAX_NODES];
351352
int n_messages;
353+
int i;
352354

353355
xid = GetTopTransactionId();
354356
sprintf(stream, "xid" XID_FMT, xid);
@@ -369,7 +371,7 @@ MtmExplicitPrepare(char *gid)
369371
gather(participants, messages, &n_messages);
370372
dmq_stream_unsubscribe(stream);
371373

372-
for (int i = 0; i < n_messages; i++)
374+
for (i = 0; i < n_messages; i++)
373375
{
374376
MtmMessageCode status = pq_getmsgbyte(messages[i].message);
375377

src/pglogical_apply.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,6 @@ process_remote_commit(StringInfo in, GlobalTransactionId *current_gtid, MtmRecei
905905
uint8 event;
906906
XLogRecPtr end_lsn;
907907
XLogRecPtr origin_lsn;
908-
XLogRecPtr commit_lsn;
909908
int origin_node;
910909
char gid[GIDSIZE];
911910

@@ -916,7 +915,7 @@ process_remote_commit(StringInfo in, GlobalTransactionId *current_gtid, MtmRecei
916915
MtmReplicationNodeId = pq_getmsgbyte(in);
917916

918917
/* read fields */
919-
commit_lsn = pq_getmsgint64(in); /* commit_lsn */
918+
pq_getmsgint64(in); /* commit_lsn */
920919
end_lsn = pq_getmsgint64(in); /* end_lsn */
921920
replorigin_session_origin_timestamp = pq_getmsgint64(in); /* commit_time */
922921

@@ -1369,7 +1368,7 @@ process_remote_delete(StringInfo s, Relation rel)
13691368
EState *estate;
13701369
TupleData oldtup;
13711370
TupleTableSlot *oldslot;
1372-
Oid idxoid;
1371+
Oid idxoid = InvalidOid;
13731372
Relation idxrel;
13741373
TupleDesc tupDesc = RelationGetDescr(rel);
13751374
ScanKeyData skey[INDEX_MAX_KEYS];

0 commit comments

Comments
 (0)