cpg.c: resolve almost all warnings

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1917 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Jim Meyering 2009-03-30 21:09:38 +00:00
parent 767e64ff4d
commit 1919ff31c7
4 changed files with 19 additions and 19 deletions

View File

@ -481,7 +481,7 @@ int main_mcast (
return (totempg_groups_mcast_joined (corosync_group_handle, iovec, iov_len, guarantee));
}
int message_source_is_local (mar_message_source_t *source)
int message_source_is_local (const mar_message_source_t *source)
{
int ret = 0;

View File

@ -62,6 +62,6 @@ extern int main_mcast (
extern void message_source_set (mar_message_source_t *source, void *conn);
extern int message_source_is_local (mar_message_source_t *source);
extern int message_source_is_local (const mar_message_source_t *source);
#endif /* MAIN_H_DEFINED */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008 Red Hat, Inc.
* Copyright (c) 2008, 2009 Red Hat, Inc.
*
* All rights reserved.
*
@ -386,7 +386,7 @@ struct corosync_api_v1 {
*/
void (*ipc_source_set) (mar_message_source_t *source, void *conn);
int (*ipc_source_is_local) (mar_message_source_t *source);
int (*ipc_source_is_local) (const mar_message_source_t *source);
void *(*ipc_private_data_get) (void *conn);
@ -557,7 +557,7 @@ struct corosync_lib_handler {
};
struct corosync_exec_handler {
void (*exec_handler_fn) (void *msg, unsigned int nodeid);
void (*exec_handler_fn) (const void *msg, unsigned int nodeid);
void (*exec_endian_convert_fn) (void *msg);
};

View File

@ -131,11 +131,11 @@ static int cpg_lib_init_fn (void *conn);
static int cpg_lib_exit_fn (void *conn);
static void message_handler_req_exec_cpg_procjoin (
void *message,
const void *message,
unsigned int nodeid);
static void message_handler_req_exec_cpg_procleave (
void *message,
const void *message,
unsigned int nodeid);
static void message_handler_req_exec_cpg_joinlist (
@ -143,11 +143,11 @@ static void message_handler_req_exec_cpg_joinlist (
unsigned int nodeid);
static void message_handler_req_exec_cpg_mcast (
void *message,
const void *message,
unsigned int nodeid);
static void message_handler_req_exec_cpg_downlist (
void *message,
const void *message,
unsigned int nodeid);
static void exec_cpg_procjoin_endian_convert (void *msg);
@ -780,10 +780,10 @@ local_join:
}
static void message_handler_req_exec_cpg_downlist (
void *message,
const void *message,
unsigned int nodeid)
{
struct req_exec_cpg_downlist *req_exec_cpg_downlist = (struct req_exec_cpg_downlist *)message;
const struct req_exec_cpg_downlist *req_exec_cpg_downlist = message;
int i;
struct list_head removed_list;
@ -813,10 +813,10 @@ static void message_handler_req_exec_cpg_downlist (
}
static void message_handler_req_exec_cpg_procjoin (
void *message,
const void *message,
unsigned int nodeid)
{
struct req_exec_cpg_procjoin *req_exec_cpg_procjoin = (struct req_exec_cpg_procjoin *)message;
const struct req_exec_cpg_procjoin *req_exec_cpg_procjoin = message;
log_printf(LOG_LEVEL_DEBUG, "got procjoin message from cluster node %d\n", nodeid);
@ -826,10 +826,10 @@ static void message_handler_req_exec_cpg_procjoin (
}
static void message_handler_req_exec_cpg_procleave (
void *message,
const void *message,
unsigned int nodeid)
{
struct req_exec_cpg_procjoin *req_exec_cpg_procjoin = (struct req_exec_cpg_procjoin *)message;
const struct req_exec_cpg_procjoin *req_exec_cpg_procjoin = message;
struct group_info *gi;
struct process_info *pi;
struct list_head *iter;
@ -895,10 +895,10 @@ static void message_handler_req_exec_cpg_joinlist (
}
static void message_handler_req_exec_cpg_mcast (
void *message,
const void *message,
unsigned int nodeid)
{
struct req_exec_cpg_mcast *req_exec_cpg_mcast = (struct req_exec_cpg_mcast *)message;
const struct req_exec_cpg_mcast *req_exec_cpg_mcast = message;
struct res_lib_cpg_deliver_callback *res_lib_cpg_mcast;
int msglen = req_exec_cpg_mcast->msglen;
char buf[sizeof(*res_lib_cpg_mcast) + msglen];
@ -922,8 +922,8 @@ static void message_handler_req_exec_cpg_mcast (
}
memcpy(&res_lib_cpg_mcast->group_name, &gi->group_name,
sizeof(mar_cpg_name_t));
memcpy(&res_lib_cpg_mcast->message, (char*)message+sizeof(*req_exec_cpg_mcast),
msglen);
memcpy(&res_lib_cpg_mcast->message,
(const char*)message+sizeof(*req_exec_cpg_mcast), msglen);
/* Send to all interested members */
for (iter = gi->members.next; iter != &gi->members; iter = iter->next) {