public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Chris Feist <cfeist@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: the tag gfs-kernel_0_1_32 has been created
Date: Tue, 05 May 2009 18:19:00 -0000 [thread overview]
Message-ID: <20090505174011.61BC212026E@lists.fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d0b8e7806f394228329ff797c999a723d89d4d6e
Commit: d0b8e7806f394228329ff797c999a723d89d4d6e
Parent: 1e648a83f6f5aa0c146ce25e8fd5c47c511077e5
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Tue May 5 09:02:04 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue May 5 09:03:53 2009 +0200
cman: fix cman_tool build warnings spotted by paranoia cflags
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/cman_tool/cman_tool.h | 2 +-
cman/cman_tool/join.c | 10 ++++++----
cman/cman_tool/main.c | 9 +++++----
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/cman/cman_tool/cman_tool.h b/cman/cman_tool/cman_tool.h
index 7476e1f..3766ee2 100644
--- a/cman/cman_tool/cman_tool.h
+++ b/cman/cman_tool/cman_tool.h
@@ -95,6 +95,6 @@ struct commandline
typedef struct commandline commandline_t;
int join(commandline_t *comline, char *envp[]);
-char *cman_error(int err);
+const char *cman_error(int err);
#endif /* __CMAN_TOOL_DOT_H__ */
diff --git a/cman/cman_tool/join.c b/cman/cman_tool/join.c
index 9c78937..86a69c2 100644
--- a/cman/cman_tool/join.c
+++ b/cman/cman_tool/join.c
@@ -40,7 +40,7 @@ static void be_daemon(int close_stderr)
}
-static char *corosync_exit_reason(signed char status)
+static const char *corosync_exit_reason(signed char status)
{
static char reason[256];
switch (status) {
@@ -200,10 +200,12 @@ int join(commandline_t *comline, char *main_envp[])
/* Always run corosync -f because we have already forked twice anyway, and
we want to return any exit code that might happen */
- argv[0] = "corosync";
- argv[++argvptr] = "-f";
+ /* also strdup strings because it's otherwise virtually impossible to fix
+ * build warnings due to the way argv C implementation is done */
+ argv[0] = strdup("corosync");
+ argv[++argvptr] = strdup("-f");
if (comline->nosetpri_opt)
- argv[++argvptr] = "-p";
+ argv[++argvptr] = strdup("-p");
argv[++argvptr] = NULL;
/* Fork/exec cman */
diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c
index 450b31c..aef82ac 100644
--- a/cman/cman_tool/main.c
+++ b/cman/cman_tool/main.c
@@ -473,9 +473,9 @@ static int show_services(void)
}
-char *cman_error(int err)
+const char *cman_error(int err)
{
- char *die_error;
+ const char *die_error;
switch (errno) {
case ENOTCONN:
@@ -696,8 +696,6 @@ static void decode_arguments(int argc, char *argv[], commandline_t *comline)
int optchar, i;
int show_help = 0;
- comline->config_lcrso=DEFAULT_CONFIG_MODULE;
-
while (cont) {
optchar = getopt(argc, argv, OPTION_STRING);
@@ -837,6 +835,9 @@ static void decode_arguments(int argc, char *argv[], commandline_t *comline)
};
}
+ if (comline->config_lcrso == NULL)
+ comline->config_lcrso = strdup(DEFAULT_CONFIG_MODULE);
+
while (optind < argc) {
if (strcmp(argv[optind], "join") == 0) {
if (comline->operation)
reply other threads:[~2009-05-05 18:19 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=20090505174011.61BC212026E@lists.fedorahosted.org \
--to=cfeist@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).