remove compile warning
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/13c9f7c4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/13c9f7c4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/13c9f7c4 Branch: refs/heads/refine_cluster Commit: 13c9f7c48babd0c41fce5e6f6b4588fd944bda59 Parents: cb0b2b5 Author: Yu Qing <[email protected]> Authored: Wed Dec 4 16:52:18 2013 +0800 Committer: Yu Qing <[email protected]> Committed: Wed Dec 4 17:04:06 2013 +0800 ---------------------------------------------------------------------- iocore/cluster/machine.cc | 8 ++++---- iocore/cluster/session.cc | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13c9f7c4/iocore/cluster/machine.cc ---------------------------------------------------------------------- diff --git a/iocore/cluster/machine.cc b/iocore/cluster/machine.cc index 18ac1a9..36d8fde 100644 --- a/iocore/cluster/machine.cc +++ b/iocore/cluster/machine.cc @@ -56,7 +56,7 @@ ClusterMachine *add_machine(const unsigned int ip, const int port) int result; char *ip_addr; - memset(&machine, 0, sizeof(machine)); + memset((void *)&machine, 0, sizeof(machine)); in.s_addr = ip; ip_addr = inet_ntoa(in); machine.hostname_len = strlen(ip_addr); @@ -84,7 +84,7 @@ int init_machines() "malloc %d bytes fail!", __LINE__, bytes); return ENOMEM; } - memset(cluster_machines, 0, bytes); + memset((void *)cluster_machines, 0, bytes); bytes = sizeof(ClusterMachine *) * MAX_MACHINE_COUNT; sorted_machines = (ClusterMachine **)malloc(bytes); @@ -93,7 +93,7 @@ int init_machines() "malloc %d bytes fail!", __LINE__, bytes); return ENOMEM; } - memset(sorted_machines, 0, bytes); + memset((void *)sorted_machines, 0, bytes); return 0; } @@ -184,7 +184,7 @@ ClusterMachine *get_machine(const unsigned int ip, const int port) ClusterMachine *target; ClusterMachine **found; - memset(&machine, 0, sizeof(machine)); + memset((void *)&machine, 0, sizeof(machine)); machine.ip = ip; machine.cluster_port = port; target = &machine; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13c9f7c4/iocore/cluster/session.cc ---------------------------------------------------------------------- diff --git a/iocore/cluster/session.cc b/iocore/cluster/session.cc index b4401e1..0a2d2ca 100644 --- a/iocore/cluster/session.cc +++ b/iocore/cluster/session.cc @@ -652,8 +652,9 @@ int get_response_session(const MsgHeader *pHeader, if ((*ppMachineSessions)->is_myself) { //request by me if (IS_SESSION_EMPTY(pSession->session_id)) { Debug(CLUSTER_DEBUG_TAG, "file: "__FILE__", line: %d, " - "client sessionEntry: %16lX:%lX not exist, func_id: %d", - __LINE__, pHeader->session_id.ids[0], + "client sessionEntry: %08X:%u:%"PRId64" not exist, func_id: %d", + __LINE__, pHeader->session_id.fields.ip, + pHeader->session_id.fields.timestamp, pHeader->session_id.ids[1], pHeader->func_id); *sessionEntry = NULL; *call_func = false;
