Jim, We decided to revert the const change to cpg because people like to do in-place endian modification on delivered messages.
Regards -steve On Mon, 2009-05-04 at 11:28 +0200, Jim Meyering wrote: > There were some new warnings due to const mismatches > and one unused static declaration. > > This fixes the offenders. > > From 3cff529156719f6a7557a7133403aa80dabbc1c0 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Mon, 4 May 2009 10:35:59 +0200 > Subject: [PATCH] avoid new warnings > MIME-Version: 1.0 > Content-Type: text/plain; charset=utf-8 > Content-Transfer-Encoding: 8bit > > * votequorum.c: Avoid declaration of unused: ‘votequorum_instance_destructor’ > * include/corosync/cpg.h (cpg_deliver_fn_t) [msg]: Declare as "const". > That change required a similar adjustments to each of the following: > * cpgbench.c: Add const. > * testcpg2.c: Likewise. > * testcpg.c: Likewise. > * testzcgc.c: Likewise. > * cpgbenchzc.c: Likewise. > * testcpgzc.c: Likewise. > --- > include/corosync/cpg.h | 2 +- > lib/votequorum.c | 2 -- > test/cpgbench.c | 2 +- > test/cpgbenchzc.c | 2 +- > test/testcpg.c | 2 +- > test/testcpg2.c | 2 +- > test/testcpgzc.c | 2 +- > test/testzcgc.c | 2 +- > 8 files changed, 7 insertions(+), 9 deletions(-) > > diff --git a/include/corosync/cpg.h b/include/corosync/cpg.h > index 644d8d8..30e4b79 100644 > --- a/include/corosync/cpg.h > +++ b/include/corosync/cpg.h > @@ -88,7 +88,7 @@ typedef void (*cpg_deliver_fn_t) ( > const struct cpg_name *group_name, > uint32_t nodeid, > uint32_t pid, > - void *msg, > + const void *msg, > size_t msg_len); > > typedef void (*cpg_confchg_fn_t) ( > diff --git a/lib/votequorum.c b/lib/votequorum.c > index fd5a924..f76395a 100644 > --- a/lib/votequorum.c > +++ b/lib/votequorum.c > @@ -64,8 +64,6 @@ struct votequorum_inst { > votequorum_callbacks_t callbacks; > }; > > -static void votequorum_instance_destructor (void *instance); > - > DECLARE_HDB_DATABASE(votequorum_handle_t_db,NULL); > > cs_error_t votequorum_initialize ( > diff --git a/test/cpgbench.c b/test/cpgbench.c > index 7663103..aff3acf 100644 > --- a/test/cpgbench.c > +++ b/test/cpgbench.c > @@ -85,7 +85,7 @@ static void cpg_bm_deliver_fn ( > const struct cpg_name *group_name, > uint32_t nodeid, > uint32_t pid, > - void *msg, > + const void *msg, > size_t msg_len) > { > write_count++; > diff --git a/test/cpgbenchzc.c b/test/cpgbenchzc.c > index 360c533..2f8c0fb 100644 > --- a/test/cpgbenchzc.c > +++ b/test/cpgbenchzc.c > @@ -85,7 +85,7 @@ static void cpg_bm_deliver_fn ( > const struct cpg_name *group_name, > uint32_t nodeid, > uint32_t pid, > - void *msg, > + const void *msg, > size_t msg_len) > { > write_count++; > diff --git a/test/testcpg.c b/test/testcpg.c > index 465933a..b4d5d9f 100644 > --- a/test/testcpg.c > +++ b/test/testcpg.c > @@ -67,7 +67,7 @@ static void DeliverCallback ( > const struct cpg_name *groupName, > uint32_t nodeid, > uint32_t pid, > - void *msg, > + const void *msg, > size_t msg_len) > { > if (show_ip) { > diff --git a/test/testcpg2.c b/test/testcpg2.c > index ff53edd..f0218c4 100644 > --- a/test/testcpg2.c > +++ b/test/testcpg2.c > @@ -48,7 +48,7 @@ static void deliver( > const struct cpg_name *group_name, > uint32_t nodeid, > uint32_t pid, > - void *msg, > + const void *msg, > size_t msg_len) > { > printf("self delivered nodeid: %x\n", nodeid); > diff --git a/test/testcpgzc.c b/test/testcpgzc.c > index 6c7e376..9e13966 100644 > --- a/test/testcpgzc.c > +++ b/test/testcpgzc.c > @@ -67,7 +67,7 @@ static void DeliverCallback ( > const struct cpg_name *groupName, > uint32_t nodeid, > uint32_t pid, > - void *msg, > + const void *msg, > size_t msg_len) > { > if (show_ip) { > diff --git a/test/testzcgc.c b/test/testzcgc.c > index 7ec8a0e..da37655 100644 > --- a/test/testzcgc.c > +++ b/test/testzcgc.c > @@ -67,7 +67,7 @@ static void DeliverCallback ( > const struct cpg_name *groupName, > uint32_t nodeid, > uint32_t pid, > - void *msg, > + const void *msg, > size_t msg_len) > { > if (show_ip) { > -- > 1.6.3.rc4.190.g4648 > _______________________________________________ > Openais mailing list > [email protected] > https://lists.linux-foundation.org/mailman/listinfo/openais _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
