rpcrt4: Don't use sizeof in traces to avoid printf format warnings.

This commit is contained in:
Alexandre Julliard 2006-06-13 14:11:28 +02:00
parent 96ad688174
commit 2a91838f0c
3 changed files with 5 additions and 5 deletions

View File

@ -485,7 +485,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
/* read packet common header */ /* read packet common header */
dwRead = rpcrt4_conn_read(Connection, &common_hdr, sizeof(common_hdr)); dwRead = rpcrt4_conn_read(Connection, &common_hdr, sizeof(common_hdr));
if (dwRead != sizeof(common_hdr)) { if (dwRead != sizeof(common_hdr)) {
WARN("Short read of header, %ld/%d bytes\n", dwRead, sizeof(common_hdr)); WARN("Short read of header, %ld bytes\n", dwRead);
status = RPC_S_PROTOCOL_ERROR; status = RPC_S_PROTOCOL_ERROR;
goto fail; goto fail;
} }

View File

@ -317,7 +317,7 @@ static RPC_STATUS rpcrt4_ncacn_np_parse_top_of_tower(const unsigned char *tower_
const twr_empty_floor_t *smb_floor = (const twr_empty_floor_t *)tower_data; const twr_empty_floor_t *smb_floor = (const twr_empty_floor_t *)tower_data;
const twr_empty_floor_t *nb_floor; const twr_empty_floor_t *nb_floor;
TRACE("(%p, %d, %p, %p)\n", tower_data, tower_size, networkaddr, endpoint); TRACE("(%p, %d, %p, %p)\n", tower_data, (int)tower_size, networkaddr, endpoint);
if (tower_size < sizeof(*smb_floor)) if (tower_size < sizeof(*smb_floor))
return EPT_S_NOT_REGISTERED; return EPT_S_NOT_REGISTERED;
@ -408,7 +408,7 @@ static RPC_STATUS rpcrt4_ncalrpc_parse_top_of_tower(const unsigned char *tower_d
{ {
const twr_empty_floor_t *pipe_floor = (const twr_empty_floor_t *)tower_data; const twr_empty_floor_t *pipe_floor = (const twr_empty_floor_t *)tower_data;
TRACE("(%p, %d, %p, %p)\n", tower_data, tower_size, networkaddr, endpoint); TRACE("(%p, %d, %p, %p)\n", tower_data, (int)tower_size, networkaddr, endpoint);
*networkaddr = NULL; *networkaddr = NULL;
*endpoint = NULL; *endpoint = NULL;
@ -642,7 +642,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_parse_top_of_tower(const unsigned char *to
const twr_ipv4_floor_t *ipv4_floor; const twr_ipv4_floor_t *ipv4_floor;
struct in_addr in_addr; struct in_addr in_addr;
TRACE("(%p, %d, %p, %p)\n", tower_data, tower_size, networkaddr, endpoint); TRACE("(%p, %d, %p, %p)\n", tower_data, (int)tower_size, networkaddr, endpoint);
if (tower_size < sizeof(*tcp_floor)) if (tower_size < sizeof(*tcp_floor))
return EPT_S_NOT_REGISTERED; return EPT_S_NOT_REGISTERED;

View File

@ -145,7 +145,7 @@ BOOL RPCRT4_SendReceiveNPMsg(HANDLE np, PRPCSS_NP_MESSAGE msg, char *vardata, PR
} }
if (count != sizeof(RPCSS_NP_REPLY)) { if (count != sizeof(RPCSS_NP_REPLY)) {
ERR("read count mismatch. got %ld, expected %u.\n", count, sizeof(RPCSS_NP_REPLY)); ERR("read count mismatch. got %ld.\n", count);
return FALSE; return FALSE;
} }