Skip to content

Commit b07cf6f

Browse files
committed
make clang happy about %lld
1 parent f31cb8a commit b07cf6f

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

contrib/mmts/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) {

contrib/mmts/multimaster.c

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

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

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

contrib/raftable/raftable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static RaftableMessage *raftable_try_query(RaftableMessage *msg, size_t size, si
332332
RaftableMessage *answer;
333333

334334
s = get_connection(timeout);
335-
if (s < 0) return false;
335+
if (s < 0) return NULL;
336336

337337
if (timeout_happened(timeout))
338338
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy