@@ -36,7 +36,7 @@ int raft_apply(struct raft *r,
36
36
37
37
/* Index of the first entry being appended. */
38
38
index = logLastIndex (r -> log ) + 1 ;
39
- tracef ("%u commands starting at %lld" , n , index );
39
+ tracef ("%u commands starting at %" PRIu64 , n , index );
40
40
req -> type = RAFT_COMMAND ;
41
41
req -> index = index ;
42
42
req -> cb = cb ;
@@ -86,7 +86,7 @@ int raft_barrier(struct raft *r, struct raft_barrier *req, raft_barrier_cb cb)
86
86
87
87
/* Index of the barrier entry being appended. */
88
88
index = logLastIndex (r -> log ) + 1 ;
89
- tracef ("barrier starting at %lld" , index );
89
+ tracef ("barrier starting at %" PRIu64 , index );
90
90
req -> type = RAFT_BARRIER ;
91
91
req -> index = index ;
92
92
req -> cb = cb ;
@@ -180,7 +180,7 @@ int raft_add(struct raft *r,
180
180
return rv ;
181
181
}
182
182
183
- tracef ("add server: id %llu , address %s" , id , address );
183
+ tracef ("add server: id %" PRIu64 " , address %s" , id , address );
184
184
185
185
/* Make a copy of the current configuration, and add the new server to
186
186
* it. */
@@ -224,7 +224,7 @@ int raft_assign(struct raft *r,
224
224
raft_index last_index ;
225
225
int rv ;
226
226
227
- tracef ("raft_assign to id:%llu the role:%d" , id , role );
227
+ tracef ("raft_assign to id:%" PRIu64 " the role:%d" , id , role );
228
228
if (role != RAFT_STANDBY && role != RAFT_VOTER && role != RAFT_SPARE ) {
229
229
rv = RAFT_BADROLE ;
230
230
ErrMsgFromCode (r -> errmsg , rv );
@@ -239,7 +239,7 @@ int raft_assign(struct raft *r,
239
239
server = configurationGet (& r -> configuration , id );
240
240
if (server == NULL ) {
241
241
rv = RAFT_NOTFOUND ;
242
- ErrMsgPrintf (r -> errmsg , "no server has ID %llu" , id );
242
+ ErrMsgPrintf (r -> errmsg , "no server has ID %" PRIu64 , id );
243
243
goto err ;
244
244
}
245
245
@@ -305,7 +305,7 @@ int raft_assign(struct raft *r,
305
305
rv = replicationProgress (r , server_index );
306
306
if (rv != 0 && rv != RAFT_NOCONNECTION ) {
307
307
/* This error is not fatal. */
308
- tracef ("failed to send append entries to server %llu : %s (%d)" ,
308
+ tracef ("failed to send append entries to server %" PRIu64 " : %s (%d)" ,
309
309
server -> id , raft_strerror (rv ), rv );
310
310
}
311
311
@@ -336,7 +336,7 @@ int raft_remove(struct raft *r,
336
336
goto err ;
337
337
}
338
338
339
- tracef ("remove server: id %llu" , id );
339
+ tracef ("remove server: id %" PRIu64 , id );
340
340
341
341
/* Make a copy of the current configuration, and remove the given server
342
342
* from it. */
@@ -403,7 +403,7 @@ int raft_transfer(struct raft *r,
403
403
unsigned i ;
404
404
int rv ;
405
405
406
- tracef ("transfer to %llu" , id );
406
+ tracef ("transfer to %016" PRIu64 , id );
407
407
if (r -> state != RAFT_LEADER || r -> transfer != NULL ) {
408
408
tracef ("transfer error - state:%d" , r -> state );
409
409
rv = RAFT_NOTLEADER ;
0 commit comments