public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: rgmanager: master - rgmanager: Fix complier warnings in msg_cluster.c
Date: Mon, 22 Jun 2009 17:22:00 -0000	[thread overview]
Message-ID: <20090622165358.0F5841201D4@lists.fedorahosted.org> (raw)

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);


                 reply	other threads:[~2009-06-22 17:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090622165358.0F5841201D4@lists.fedorahosted.org \
    --to=lon@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).