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

Commit 1e3bdee

Browse files
committed
make clang happy about %lld
1 parent e91a49a commit 1e3bdee

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

arbiter.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static void MtmMonitor(Datum arg);
9191
static void MtmSendHeartbeat(void);
9292
static bool MtmSendToNode(int node, void const* buf, int size);
9393

94-
94+
/*
9595
static char const* const messageText[] =
9696
{
9797
"INVALID",
@@ -105,6 +105,7 @@ static char const* const messageText[] =
105105
"POLL_REQUEST",
106106
"POLL_STATUS"
107107
};
108+
*/
108109

109110
static BackgroundWorker MtmSenderWorker = {
110111
"mtm-sender",
@@ -362,7 +363,7 @@ static void MtmSendHeartbeat()
362363
MTM_LOG2("Send heartbeat to node %d with timestamp %ld", i+1, now);
363364
}
364365
} else {
365-
MTM_LOG1("Do not send heartbeat to node %d, busy mask %ld, status %d", i+1, busy_mask, Mtm->status);
366+
MTM_LOG1("Do not send heartbeat to node %d, busy mask %lld, status %d", i+1, (long long) busy_mask, Mtm->status);
366367
}
367368
}
368369
}
@@ -935,7 +936,9 @@ static void MtmReceiver(Datum arg)
935936
CommitTransactionCommand();
936937
Assert(ts->status == TRANSACTION_STATUS_ABORTED);
937938
} else {
938-
elog(LOG, "Receive response %d for transaction %s for node %d, votedMask=%lx, participantsMask=%lx", msg->status, msg->gid, node, ts->votedMask, ts->participantsMask & ~Mtm->disabledNodeMask);
939+
elog(LOG, "Receive response %d for transaction %s for node %d, votedMask=%llx, participantsMask=%llx",
940+
msg->status, msg->gid, node, (long long) ts->votedMask,
941+
(long long) (ts->participantsMask & ~Mtm->disabledNodeMask) );
939942
continue;
940943
}
941944
} else if (ts->status == TRANSACTION_STATUS_ABORTED && msg->status == TRANSACTION_STATUS_COMMITTED) {

multimaster.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,8 +1357,8 @@ static void MtmEnableNode(int nodeId)
13571357
void MtmRecoveryCompleted(void)
13581358
{
13591359
int i;
1360-
MTM_LOG1("Recovery of node %d is completed, disabled mask=%lx, connectivity mask=%lx, live nodes=%d",
1361-
MtmNodeId, Mtm->disabledNodeMask, Mtm->connectivityMask, Mtm->nLiveNodes);
1360+
MTM_LOG1("Recovery of node %d is completed, disabled mask=%llx, connectivity mask=%llx, live nodes=%d",
1361+
MtmNodeId, (long long) Mtm->disabledNodeMask, (long long) Mtm->connectivityMask, Mtm->nLiveNodes);
13621362
MtmLock(LW_EXCLUSIVE);
13631363
Mtm->recoverySlot = 0;
13641364
BIT_CLEAR(Mtm->disabledNodeMask, MtmNodeId-1);
@@ -1718,7 +1718,7 @@ void MtmOnNodeDisconnect(int nodeId)
17181718
MtmLock(LW_EXCLUSIVE);
17191719
BIT_SET(Mtm->connectivityMask, nodeId-1);
17201720
BIT_SET(Mtm->reconnectMask, nodeId-1);
1721-
MTM_LOG1("Disconnect node %d connectivity mask %lx", nodeId, Mtm->connectivityMask);
1721+
MTM_LOG1("Disconnect node %d connectivity mask %llx", nodeId, (long long) Mtm->connectivityMask);
17221722
MtmUnlock();
17231723

17241724
if (!RaftableSet(psprintf("node-mask-%d", MtmNodeId), &Mtm->connectivityMask, sizeof Mtm->connectivityMask, false))
@@ -1763,7 +1763,7 @@ void MtmOnNodeConnect(int nodeId)
17631763
BIT_CLEAR(Mtm->reconnectMask, nodeId-1);
17641764
MtmUnlock();
17651765

1766-
MTM_LOG1("Reconnect node %d, connectivityMask=%lx", nodeId, Mtm->connectivityMask);
1766+
MTM_LOG1("Reconnect node %d, connectivityMask=%llx", nodeId, (long long) Mtm->connectivityMask);
17671767
RaftableSet(psprintf("node-mask-%d", MtmNodeId), &Mtm->connectivityMask, sizeof Mtm->connectivityMask, false);
17681768
}
17691769

0 commit comments

Comments
 (0)