public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* rgmanager: master - rgmanager: Fix complier warnings in msg_cluster.c
@ 2009-06-22 17:22 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-06-22 17:22 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/rgmanager.git?p=rgmanager.git;a=commitdiff;h=40808c8c841f4cfea91497ee100f620f164a3c16
Commit:        40808c8c841f4cfea91497ee100f620f164a3c16
Parent:        5ae411964a4f61d4ad6a0def4f6ccdcf32cb6960
Author:        Lon Hohberger <lhh@redhat.com>
AuthorDate:    Mon Jun 15 15:55:37 2009 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Mon Jun 22 12:51:11 2009 -0400

rgmanager: Fix complier warnings in msg_cluster.c

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 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 <arpa/inet.h>
 #include <stdint.h>
 #include <pthread.h>
 #include <platform.h>
@@ -8,6 +7,7 @@
 #include <list.h>
 #include <rg_types.h>
 #include <sys/types.h>
+#include <arpa/inet.h>
 #include <sys/select.h>
 
 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 <message.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
 #include <sys/types.h>
+#include <message.h>
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <errno.h>
 
-/* 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 <message.h>
 #include <stdio.h>
 #include <pthread.h>
 #include <libcman.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <message.h>
 #include <string.h>
 #include <sys/types.h>
 #include <time.h>
@@ -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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-22 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 17:22 rgmanager: master - rgmanager: Fix complier warnings in msg_cluster.c Lon Hohberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).