public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* rgmanager: master - rgmanager: Fix restree.c compiler warnings
@ 2009-06-22 16:55 Lon Hohberger
0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-06-22 16:55 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/rgmanager.git?p=rgmanager.git;a=commitdiff;h=5978c2324fd870c56f0c2b596d5ef7c02e02f9c1
Commit: 5978c2324fd870c56f0c2b596d5ef7c02e02f9c1
Parent: aa10f0af8941f205adff37490b8d44c6bbb313e0
Author: Lon Hohberger <lhh@redhat.com>
AuthorDate: Tue Jun 16 14:20:07 2009 -0400
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Mon Jun 22 12:51:47 2009 -0400
rgmanager: Fix restree.c compiler warnings
Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
rgmanager/src/daemons/restree.c | 69 ++++++++-------------------------------
1 files changed, 14 insertions(+), 55 deletions(-)
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index 8575d16..bdb4b05 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -16,29 +16,18 @@
#include <assert.h>
/* XXX from resrules.c */
-int store_childtype(resource_child_t **childp, char *name, int start,
- int stop, int forbid, int flags);
int _res_op(resource_node_t **tree, resource_t *first, char *type,
void * __attribute__((unused))ret, int op);
static inline int
_res_op_internal(resource_node_t **tree, resource_t *first,
char *type, void *__attribute__((unused))ret, int realop,
resource_node_t *node);
-void print_env(char **env);
static inline int _res_op_internal(resource_node_t **tree, resource_t *first,
char *type, void *__attribute__((unused))ret, int realop,
resource_node_t *node);
/* XXX from reslist.c */
void * act_dup(resource_act_t *acts);
-
-
-/* XXX from reslist.c */
-void * act_dup(resource_act_t *acts);
-
-
-/* XXX from reslist.c */
-void * act_dup(resource_act_t *acts);
time_t get_time(char *action, int depth, resource_node_t *node);
@@ -70,7 +59,7 @@ _no_op_mode(int arg)
/**
ocf_strerror
*/
-const char *
+static const char *
ocf_strerror(int ret)
{
if (ret >= 0 && ret < OCF_RA_MAX)
@@ -121,7 +110,7 @@ add_ocf_stuff(resource_t *res, char **env, int depth, int refcnt)
*minor = 0;
minor++;
} else
- minor = "0";
+ minor = (char *)"0";
/*
Store the OCF major version
@@ -243,7 +232,7 @@ build_env(resource_node_t *node, int depth, int refcnt)
attrs = 0;
for (x = 0; res->r_attrs && res->r_attrs[x].ra_name; x++) {
- val = attr_value(node, res->r_attrs[x].ra_name);
+ val = (char *)attr_value(node, res->r_attrs[x].ra_name);
if (!val)
continue;
@@ -276,26 +265,10 @@ build_env(resource_node_t *node, int depth, int refcnt)
/**
- Print info in an environment array
-
- @param env Environment to print.
- */
-void
-print_env(char **env)
-{
- int x;
-
- for (x = 0; env[x]; x++) {
- printf("%s\n", env[x]);
- }
-}
-
-
-/**
Set all signal handlers to default for exec of a script.
ONLY do this after a fork().
*/
-void
+static void
restore_signals(void)
{
sigset_t set;
@@ -310,7 +283,7 @@ restore_signals(void)
/** Find the index for a given operation / depth in a resource node */
-int
+static int
res_act_index(resource_node_t *node, const char *op_str, int depth)
{
int x = 0;
@@ -506,13 +479,13 @@ assign_restart_policy(resource_t *curres, resource_node_t *parent,
if (parent) /* Non-parents don't get one for now */
return;
- val = res_attr_value(curres, "max_restarts");
+ val = (char *)res_attr_value(curres, "max_restarts");
if (!val)
return;
max_restarts = atoi(val);
if (max_restarts <= 0)
return;
- val = res_attr_value(curres, "restart_expire_time");
+ val = (char *)res_attr_value(curres, "restart_expire_time");
if (val) {
restart_expire_time = (time_t)expand_time(val);
if ((int64_t)restart_expire_time < 0)
@@ -885,7 +858,7 @@ destroy_resource_tree(resource_node_t **tree)
}
-void
+static void
_print_resource_tree(resource_node_t **tree, int level)
{
resource_node_t *node;
@@ -1052,7 +1025,7 @@ _do_child_default_level(resource_node_t **tree, resource_t *first,
in the subtree).
@see _res_op res_exec
*/
-int
+static int
_res_op_by_level(resource_node_t **tree, resource_t *first, void *ret,
int op)
{
@@ -1082,7 +1055,7 @@ _res_op_by_level(resource_node_t **tree, resource_t *first, void *ret,
}
-void
+static void
mark_nodes(resource_node_t *node, int state, int setflags, int clearflags)
{
int x;
@@ -1105,7 +1078,7 @@ mark_nodes(resource_node_t *node, int state, int setflags, int clearflags)
status operation was run and selects the highest possible resource depth
to use given the elapsed time.
*/
-int
+static int
do_status(resource_node_t *node)
{
int x = 0, idx = -1;
@@ -1178,8 +1151,8 @@ do_status(resource_node_t *node)
}
-void
-set_time(char *action, int depth, resource_node_t *node)
+static void
+set_time(const char *action, int depth, resource_node_t *node)
{
time_t now;
int x = 0;
@@ -1216,7 +1189,7 @@ get_time(char *action, int depth, resource_node_t *node)
}
-void
+static void
clear_checks(resource_node_t *node)
{
time_t now;
@@ -1549,20 +1522,6 @@ res_status_inquiry(resource_node_t **tree, resource_t *res, void *ret)
/**
- Grab resource info for all occurrences of a resource in a tree
-
- @param tree Tree to search for our resource.
- @param res Resource to start/stop
- @param ret Unused
- */
-int
-res_resinfo(resource_node_t **tree, resource_t *res, void *ret)
-{
- return _res_op(tree, res, NULL, ret, RS_RESINFO);
-}
-
-
-/**
Find the delta of two resource lists and flag the resources which need
to be restarted/stopped/started.
*/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-22 16:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 16:55 rgmanager: master - rgmanager: Fix restree.c compiler warnings 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).