From f9ce4bea58ef6384f2969300825277b3fe07e82a Mon Sep 17 00:00:00 2001 From: Fabien Thomas Date: Tue, 25 Apr 2006 07:28:20 +0000 Subject: [PATCH] Remove warnings under Darwin git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1008 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/amf.c | 2 +- exec/amfconfig.c | 2 +- exec/main.c | 2 +- exec/print.c | 2 +- lcr/lcr_ifact.c | 10 +++++----- test/testamf1.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/exec/amf.c b/exec/amf.c index 0626cb97..83e52285 100644 --- a/exec/amf.c +++ b/exec/amf.c @@ -1573,7 +1573,7 @@ void csi_unit_set_callback (struct amf_unit *unit, struct amf_si *si) struct list_head *csilist; struct list_head *typenamelist; struct amf_csi *csi; - struct amf_pg *pg; + struct amf_pg *pg = NULL; struct amf_comp *comp; struct amf_comp_csi_type_name *type_name; diff --git a/exec/amfconfig.c b/exec/amfconfig.c index acf2e109..af28dfde 100644 --- a/exec/amfconfig.c +++ b/exec/amfconfig.c @@ -256,7 +256,7 @@ extern int openais_amf_config_read (char **error_string) struct amf_healthcheck *amf_healthcheck = 0; struct amf_comp_csi_type_name *csi_type_name = 0; struct amf_csi *amf_csi = 0; - struct amf_csi_name_value *csi_name_value; + struct amf_csi_name_value *csi_name_value = NULL; fp = fopen (OPENAIS_CONFDIR "/groups.conf", "r"); diff --git a/exec/main.c b/exec/main.c index 354ad815..a07a0a01 100644 --- a/exec/main.c +++ b/exec/main.c @@ -79,7 +79,7 @@ #define SERVER_BACKLOG 5 -static unsigned char *release_name = "Wilson version 0.74"; +static char *release_name = "Wilson version 0.74"; static int ais_uid = 0; diff --git a/exec/print.c b/exec/print.c index 442e5d49..491aaaec 100644 --- a/exec/print.c +++ b/exec/print.c @@ -161,7 +161,7 @@ static void _log_printf (char *file, int line, int priority, gettimeofday (&tv, NULL); strftime (char_time, sizeof (char_time), "%b %e %k:%M:%S", localtime (&tv.tv_sec)); - i = sprintf (newstring, "%s.%06ld ", char_time, tv.tv_usec); + i = sprintf (newstring, "%s.%06ld ", char_time, (long)tv.tv_usec); } if ((level == LOG_LEVEL_DEBUG) || (logmode & LOG_MODE_FILELINE)) { diff --git a/lcr/lcr_ifact.c b/lcr/lcr_ifact.c index 95dfeeb4..c47d1d4f 100644 --- a/lcr/lcr_ifact.c +++ b/lcr/lcr_ifact.c @@ -100,10 +100,10 @@ static int pathlist_select (struct dirent *dirent) static inline struct lcr_component_instance *lcr_comp_find ( char *iface_name, unsigned int version, - int *iface_number) + unsigned int *iface_number) { struct lcr_component_instance *instance; - void *instance_p; + void *instance_p = NULL; unsigned int component_handle = 0; int i; @@ -134,7 +134,7 @@ static inline int lcr_lib_loaded ( char *library_name) { struct lcr_component_instance *instance; - void *instance_p; + void *instance_p = NULL; unsigned int component_handle = 0; /* @@ -156,7 +156,7 @@ static inline int lcr_lib_loaded ( return (0); } -unsigned char *path_list[128]; +char *path_list[128]; unsigned int path_list_entries = 0; static void defaults_path_build (void) @@ -327,7 +327,7 @@ int lcr_ifact_reference ( { struct lcr_iface_instance *iface_instance; struct lcr_component_instance *instance; - int iface_number; + unsigned int iface_number; unsigned int res; unsigned int i; diff --git a/test/testamf1.c b/test/testamf1.c index 4e677e35..bb6d4b8b 100644 --- a/test/testamf1.c +++ b/test/testamf1.c @@ -129,7 +129,7 @@ void ComponentTerminateCallback ( #define TRS "%s" #define TR(format,x) do { \ struct timeval t;\ - gettimeofday(&t,NULL); \ + gettimeofday(&t,NULL); \ printf("%s:%d: %s : %d : %u: %u :%s : " format "\n",\ __FILE__,__LINE__,__FUNCTION__, \ getpid(),(int)t.tv_sec, (int)t.tv_usec,#x,x); \