diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-05-29 13:58:41 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2007-05-29 13:58:41 +1000 |
commit | 1140d5a20a9a27d36631fd168d09a849b9a4983c (patch) | |
tree | 2f92ac5734270d713e21f79f269511eadc078169 /ctdb | |
parent | bc891232b600d2c03688003213f5cb0ac6977f8c (diff) | |
download | samba-1140d5a20a9a27d36631fd168d09a849b9a4983c.tar.gz samba-1140d5a20a9a27d36631fd168d09a849b9a4983c.tar.xz samba-1140d5a20a9a27d36631fd168d09a849b9a4983c.zip |
fixed more warnings on 64 bit boxes
(This used to be ctdb commit 2f6eae476203f8a8b28e083553204c01f224c8a5)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/common/ctdb_client.c | 10 | ||||
-rw-r--r-- | ctdb/common/ctdb_daemon.c | 10 | ||||
-rw-r--r-- | ctdb/common/ctdb_io.c | 4 | ||||
-rw-r--r-- | ctdb/common/ctdb_message.c | 3 | ||||
-rw-r--r-- | ctdb/common/ctdb_recoverd.c | 4 | ||||
-rw-r--r-- | ctdb/include/ctdb_private.h | 2 | ||||
-rw-r--r-- | ctdb/tcp/tcp_io.c | 3 |
7 files changed, 20 insertions, 16 deletions
diff --git a/ctdb/common/ctdb_client.c b/ctdb/common/ctdb_client.c index c384fb3bda..8a96dbc7ca 100644 --- a/ctdb/common/ctdb_client.c +++ b/ctdb/common/ctdb_client.c @@ -115,7 +115,7 @@ static void ctdb_client_read_cb(uint8_t *data, size_t cnt, void *args) } if (cnt < sizeof(*hdr)) { - DEBUG(0,("Bad packet length %u in client\n", cnt)); + DEBUG(0,("Bad packet length %u in client\n", (unsigned)cnt)); goto done; } if (cnt != hdr->length) { @@ -527,7 +527,7 @@ struct ctdb_record_handle *ctdb_fetch_lock(struct ctdb_db_context *ctdb_db, TALL } h->data = data; - DEBUG(3,("ctdb_fetch_lock: key=%*.*s\n", key.dsize, key.dsize, + DEBUG(3,("ctdb_fetch_lock: key=%*.*s\n", (int)key.dsize, (int)key.dsize, (const char *)key.dptr)); again: @@ -823,7 +823,7 @@ int ctdb_ctrl_statistics(struct ctdb_context *ctdb, uint32_t destnode, struct ct if (data.dsize != sizeof(struct ctdb_statistics)) { DEBUG(0,(__location__ " Wrong statistics size %u - expected %u\n", - data.dsize, sizeof(struct ctdb_statistics))); + (unsigned)data.dsize, (unsigned)sizeof(struct ctdb_statistics))); return -1; } @@ -1330,7 +1330,7 @@ int ctdb_ctrl_get_debuglevel(struct ctdb_context *ctdb, uint32_t destnode, uint3 } if (data.dsize != sizeof(uint32_t)) { DEBUG(0,("Bad control reply size in ctdb_get_debuglevel (got %u)\n", - data.dsize)); + (unsigned)data.dsize)); return -1; } *level = *(uint32_t *)data.dptr; @@ -1518,7 +1518,7 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA if (data.dsize < sizeof(uint32_t) || d->length != data.dsize) { - DEBUG(0,("Bad data size %u in traverse_handler\n", data.dsize)); + DEBUG(0,("Bad data size %u in traverse_handler\n", (unsigned)data.dsize)); state->done = True; return; } diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c index 6b76c1824c..7e871a15cc 100644 --- a/ctdb/common/ctdb_daemon.c +++ b/ctdb/common/ctdb_daemon.c @@ -142,9 +142,11 @@ int daemon_register_message_handler(struct ctdb_context *ctdb, uint32_t client_i } res = ctdb_register_message_handler(ctdb, client, srvid, daemon_message_handler, client); if (res != 0) { - DEBUG(0,(__location__ " Failed to register handler %llu in daemon\n", srvid)); + DEBUG(0,(__location__ " Failed to register handler %llu in daemon\n", + (unsigned long long)srvid)); } else { - DEBUG(2,(__location__ " Registered message handler for srvid=%llu\n", srvid)); + DEBUG(2,(__location__ " Registered message handler for srvid=%llu\n", + (unsigned long long)srvid)); } return res; } @@ -789,7 +791,7 @@ struct ctdb_req_header *_ctdbd_allocate_pkt(struct ctdb_context *ctdb, hdr = (struct ctdb_req_header *)talloc_size(mem_ctx, size); if (hdr == NULL) { DEBUG(0,("Unable to allocate packet for operation %u of length %u\n", - operation, length)); + operation, (unsigned)length)); return NULL; } talloc_set_name_const(hdr, type); @@ -825,7 +827,7 @@ struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb, hdr = (struct ctdb_req_header *)ctdb->methods->allocate_pkt(mem_ctx, size); if (hdr == NULL) { DEBUG(0,("Unable to allocate transport packet for operation %u of length %u\n", - operation, length)); + operation, (unsigned)length)); return NULL; } talloc_set_name_const(hdr, type); diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c index 2ca84212ce..190b6f2e09 100644 --- a/ctdb/common/ctdb_io.c +++ b/ctdb/common/ctdb_io.c @@ -85,7 +85,7 @@ static void queue_io_read(struct ctdb_queue *queue) nread = read(queue->fd, queue->partial.data + queue->partial.length, num_ready); if (nread <= 0) { - DEBUG(0,("read error nread=%d\n", nread)); + DEBUG(0,("read error nread=%d\n", (int)nread)); goto failed; } @@ -135,7 +135,7 @@ static void queue_io_read(struct ctdb_queue *queue) queue->partial.data = talloc_memdup(queue, data, nread); if (queue->partial.data == NULL) { DEBUG(0,("read error memdup partial failed for %u\n", - nread)); + (unsigned)nread)); goto failed; } queue->partial.length = nread; diff --git a/ctdb/common/ctdb_message.c b/ctdb/common/ctdb_message.c index 1a7a29508f..89bfa61a28 100644 --- a/ctdb/common/ctdb_message.c +++ b/ctdb/common/ctdb_message.c @@ -79,7 +79,8 @@ static void ctdb_local_message_trigger(struct event_context *ev, struct timed_ev res = ctdb_dispatch_message(m->ctdb, m->srvid, m->data); if (res != 0) { - DEBUG(0, (__location__ " Failed to dispatch message for srvid=%llu\n", m->srvid)); + DEBUG(0, (__location__ " Failed to dispatch message for srvid=%llu\n", + (unsigned long long)m->srvid)); } talloc_free(m); } diff --git a/ctdb/common/ctdb_recoverd.c b/ctdb/common/ctdb_recoverd.c index 2dbc9e1ce6..dca340bff2 100644 --- a/ctdb/common/ctdb_recoverd.c +++ b/ctdb/common/ctdb_recoverd.c @@ -286,7 +286,7 @@ static int vacuum_db(struct ctdb_context *ctdb, uint32_t db_id, struct ctdb_node db_id, max_rsn+1); if (ret != 0) { DEBUG(0,(__location__ " Failed to set rsn on node %u to %llu\n", - nodemap->nodes[i].vnn, max_rsn+1)); + nodemap->nodes[i].vnn, (unsigned long long)max_rsn+1)); return -1; } } @@ -300,7 +300,7 @@ static int vacuum_db(struct ctdb_context *ctdb, uint32_t db_id, struct ctdb_node db_id, max_rsn+1); if (ret != 0) { DEBUG(0,(__location__ " Failed to delete records on node %u with rsn below %llu\n", - nodemap->nodes[i].vnn, max_rsn+1)); + nodemap->nodes[i].vnn, (unsigned long long)max_rsn+1)); return -1; } } diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 07dc38d873..74c08e0b0e 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -821,7 +821,7 @@ int ctdb_control(struct ctdb_context *ctdb, uint32_t destnode, uint64_t srvid, #define CHECK_CONTROL_DATA_SIZE(size) do { \ if (indata.dsize != size) { \ DEBUG(0,(__location__ " Invalid data size in opcode %u. Got %u expected %u\n", \ - opcode, indata.dsize, size)); \ + opcode, (unsigned)indata.dsize, (unsigned)size)); \ return -1; \ } \ } while (0) diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c index e90770ec73..ee9438d44d 100644 --- a/ctdb/tcp/tcp_io.c +++ b/ctdb/tcp/tcp_io.c @@ -47,7 +47,8 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args) } if (cnt & (CTDB_TCP_ALIGNMENT-1)) { - DEBUG(0,(__location__ " Length 0x%x not multiple of alignment\n", cnt)); + DEBUG(0,(__location__ " Length 0x%x not multiple of alignment\n", + (unsigned)cnt)); goto failed; } |