1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

fixed some warnings

(This used to be ctdb commit b5434a40cf2db008eb1e681fcd2ceeff331324fa)
This commit is contained in:
Andrew Tridgell 2007-04-28 11:35:49 +02:00
parent 76381c4493
commit ee228e870d
4 changed files with 10 additions and 8 deletions

View File

@ -119,8 +119,8 @@ static void ctdb_client_read_cb(uint8_t *data, size_t cnt, void *args)
goto done;
}
if (cnt != hdr->length) {
ctdb_set_error(ctdb, "Bad header length %d expected %d in client\n",
hdr->length, cnt);
ctdb_set_error(ctdb, "Bad header length %u expected %u in client\n",
(unsigned)hdr->length, (unsigned)cnt);
goto done;
}

View File

@ -498,13 +498,14 @@ static void ctdb_daemon_read_cb(uint8_t *data, size_t cnt, void *args)
client->ctdb->status.client_packets_recv++;
if (cnt < sizeof(*hdr)) {
ctdb_set_error(client->ctdb, "Bad packet length %u in daemon\n", cnt);
ctdb_set_error(client->ctdb, "Bad packet length %u in daemon\n",
(unsigned)cnt);
return;
}
hdr = (struct ctdb_req_header *)data;
if (cnt != hdr->length) {
ctdb_set_error(client->ctdb, "Bad header length %u expected %u\n in daemon",
hdr->length, cnt);
(unsigned)hdr->length, (unsigned)cnt);
return;
}

View File

@ -43,13 +43,13 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
}
if (cnt < sizeof(*hdr)) {
ctdb_set_error(in->ctdb, "Bad packet length %d\n", cnt);
ctdb_set_error(in->ctdb, "Bad packet length %u\n", (unsigned)cnt);
return;
}
hdr = (struct ctdb_req_header *)data;
if (cnt != hdr->length) {
ctdb_set_error(in->ctdb, "Bad header length %d expected %d\n",
hdr->length, cnt);
ctdb_set_error(in->ctdb, "Bad header length %u expected %u\n",
(unsigned)hdr->length, (unsigned)cnt);
return;
}

View File

@ -36,7 +36,8 @@ static int num_clients = 2;
static void message_handler(struct ctdb_context *ctdb, uint64_t srvid,
TDB_DATA data, void *private_data)
{
printf("client vnn:%d received a message to srvid:%lld [%s]\n",ctdb_get_vnn(ctdb),srvid,data.dptr);
printf("client vnn:%d received a message to srvid:%llu [%s]\n",
ctdb_get_vnn(ctdb), (unsigned long long)srvid, data.dptr);
fflush(stdout);
}