From 1a0d9943056827ed79d2efa13867aaac71428ff8 Mon Sep 17 00:00:00 2001 From: Christine Caulfield Date: Thu, 13 Aug 2009 10:39:41 +0000 Subject: [PATCH] Fix compilation warning in clvmd.c --- WHATS_NEW | 1 + daemons/clvmd/clvmd.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 055caf671..d865a3f04 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.52 - ================================= + Fix compile warning in clvmd. Version 2.02.51 - 6th August 2009 ================================= diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index b6c403477..3bac866da 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -110,6 +110,8 @@ static int child_pipe[2]; typedef enum {IF_AUTO, IF_CMAN, IF_GULM, IF_OPENAIS, IF_COROSYNC} if_type_t; +typedef void *(lvm_pthread_fn_t)(void*); + /* Prototypes for code further down */ static void sigusr2_handler(int sig); static void sighup_handler(int sig); @@ -138,7 +140,7 @@ static int check_all_clvmds_running(struct local_client *client); static int local_rendezvous_callback(struct local_client *thisfd, char *buf, int len, const char *csid, struct local_client **new_client); -static void *lvm_thread_fn(void *); +static void lvm_thread_fn(void *) __attribute__ ((noreturn)); static int add_to_lvmqueue(struct local_client *client, struct clvm_header *msg, int msglen, const char *csid); static int distribute_command(struct local_client *thisfd); @@ -461,7 +463,7 @@ int main(int argc, char *argv[]) /* Don't let anyone else to do work until we are started */ pthread_mutex_lock(&lvm_start_mutex); - pthread_create(&lvm_thread, NULL, lvm_thread_fn, + pthread_create(&lvm_thread, NULL, (lvm_pthread_fn_t*)lvm_thread_fn, (void *)(long)using_gulm); /* Tell the rest of the cluster our version number */ @@ -1797,7 +1799,7 @@ static int process_work_item(struct lvm_thread_cmd *cmd) /* * Routine that runs in the "LVM thread". */ -static __attribute__ ((noreturn)) void *lvm_thread_fn(void *arg) +static void lvm_thread_fn(void *arg) { struct dm_list *cmdl, *tmp; sigset_t ss; -- 2.43.5