From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23437 invoked by alias); 22 Jun 2009 17:22:11 -0000 Received: (qmail 23431 invoked by alias); 22 Jun 2009 17:22:11 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion2.fedora.phx.redhat.com Subject: rgmanager: master - rgmanager: Fix complier warnings in msg_cluster.c To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: rgmanager.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 5ae411964a4f61d4ad6a0def4f6ccdcf32cb6960 X-Git-Newrev: 40808c8c841f4cfea91497ee100f620f164a3c16 From: Lon Hohberger Message-Id: <20090622165358.0F5841201D4@lists.fedorahosted.org> Date: Mon, 22 Jun 2009 17:22:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00656.txt.bz2 Gitweb: http://git.fedorahosted.org/git/rgmanager.git?p=rgmanager.git;a=commitdiff;h=40808c8c841f4cfea91497ee100f620f164a3c16 Commit: 40808c8c841f4cfea91497ee100f620f164a3c16 Parent: 5ae411964a4f61d4ad6a0def4f6ccdcf32cb6960 Author: Lon Hohberger AuthorDate: Mon Jun 15 15:55:37 2009 -0400 Committer: Lon Hohberger CommitterDate: Mon Jun 22 12:51:11 2009 -0400 rgmanager: Fix complier warnings in msg_cluster.c Signed-off-by: Lon Hohberger --- rgmanager/include/message.h | 16 +++++++++++++++- rgmanager/src/clulib/message.c | 13 +------------ rgmanager/src/clulib/msg_cluster.c | 8 ++++---- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/rgmanager/include/message.h b/rgmanager/include/message.h index 890a6c4..3cfed22 100644 --- a/rgmanager/include/message.h +++ b/rgmanager/include/message.h @@ -1,6 +1,5 @@ #ifndef _MESSAGE_H #define _MESSAGE_H -#include #include #include #include @@ -8,6 +7,7 @@ #include #include #include +#include #include typedef enum { @@ -157,4 +157,18 @@ int msg_fd_clr(msgctx_t *ctx, fd_set *fds); void msg_print(msgctx_t *ctx); int msg_shutdown(void); + +/* From msg_cluster */ +int cluster_msg_init(msgctx_t *ctx); +int cluster_msg_listen(int me, void *, msgctx_t **ctx); +int cluster_msg_shutdown(void); + +/* From msg_socket */ +int sock_msg_init(msgctx_t *ctx); +int sock_msg_listen(int me, void *, msgctx_t **ctx); +int sock_msg_shutdown(void); + +/* Debugging */ +void dump_cluster_ctx(FILE *fp); + #endif diff --git a/rgmanager/src/clulib/message.c b/rgmanager/src/clulib/message.c index 133dbb9..461e080 100644 --- a/rgmanager/src/clulib/message.c +++ b/rgmanager/src/clulib/message.c @@ -1,25 +1,14 @@ #define _MESSAGE_BUILD -#include #include #include #include #include #include +#include #include #include #include -/* From msg_cluster */ -int cluster_msg_init(msgctx_t *ctx); -int cluster_msg_listen(int me, void *, msgctx_t **ctx); -int cluster_msg_shutdown(void); - -/* From msg_socket */ -int sock_msg_init(msgctx_t *ctx); -int sock_msg_listen(int me, void *, msgctx_t **ctx); -int sock_msg_shutdown(void); - - /** Message sending API. Sends to the cluster or a socket, depending on the context. diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c index d762daa..20d2c7f 100644 --- a/rgmanager/src/clulib/msg_cluster.c +++ b/rgmanager/src/clulib/msg_cluster.c @@ -1,10 +1,10 @@ #define _MESSAGE_BUILD -#include #include #include #include #include #include +#include #include #include #include @@ -339,7 +339,7 @@ cluster_msg_fd_set(msgctx_t *ctx, fd_set *fds, int *max) } -int +static int cluster_msg_fd_isset(msgctx_t *ctx, fd_set *fds) { errno = EINVAL; @@ -361,7 +361,7 @@ cluster_msg_fd_isset(msgctx_t *ctx, fd_set *fds) } -int +static int cluster_msg_fd_clr(msgctx_t *ctx, fd_set *fds) { errno = EINVAL; @@ -1021,7 +1021,7 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg) break; } - argp = ((char *)msg + sizeof(cluster_msg_hdr_t)); + argp = (int*)((char *)msg + sizeof(cluster_msg_hdr_t)); *argp = arg; node->len = sizeof(cluster_msg_hdr_t) + sizeof(int);