Feel free to merge everything but the totemnet and totemsrp bits.  Those
patches are already in the logsysv2 tree.

Thanks
-steve

On Wed, 2008-10-22 at 09:19 +1300, angus salkeld wrote:
> This should remove all the warnings from corosync.
> 
> ---
>  exec/apidef.c                     |    7 ++++++-
>  exec/ipc.c                        |    4 +++-
>  exec/totemnet.c                   |    1 +
>  exec/totemsrp.c                   |    1 +
>  include/corosync/engine/coroapi.h |    1 +
>  lib/sa-confdb.h                   |    2 ++
>  services/confdb.c                 |    4 ----
>  test/evsverify.c                  |    4 ++--
>  9 files changed, 17 insertions(+), 9 deletions(-)
> 
> diff --git a/exec/apidef.c b/exec/apidef.c
> index a3b3520..0bf2795 100644
> --- a/exec/apidef.c
> +++ b/exec/apidef.c
> @@ -60,6 +60,11 @@ typedef int (*typedef_tpg_leave) (corosync_tpg_handle, 
> struct corosync_tpg_group
>  typedef int (*typedef_tpg_groups_mcast) (corosync_tpg_handle, int, struct 
> corosync_tpg_group *, int groups_cnt, struct iovec *, int);
>  typedef int (*typedef_tpg_groups_send_ok) (corosync_tpg_handle, struct 
> corosync_tpg_group *, int groups_cnt, struct iovec *, int);
>  
> +static inline void _corosync_public_exit_error (
> +     corosync_fatal_error_t err, const char *file, unsigned int line)
> +{
> +     _corosync_exit_error (err, file, line);
> +}
>  
>  static struct corosync_api_v1 apidef_corosync_api_v1 = {
>       .timer_add_duration = corosync_timer_add_duration,
> @@ -100,7 +105,7 @@ static struct corosync_api_v1 apidef_corosync_api_v1 = {
>       .plugin_interface_reference = lcr_ifact_reference,
>       .plugin_interface_release = lcr_ifact_release,
>       .error_memory_failure = _corosync_out_of_memory_error,
> -     .fatal_error = _corosync_exit_error
> +     .fatal_error = _corosync_public_exit_error
>  };
>  
>  void apidef_init (struct objdb_iface_ver0 *objdb) {
> diff --git a/exec/ipc.c b/exec/ipc.c
> index 15f2eab..41ce72c 100644
> --- a/exec/ipc.c
> +++ b/exec/ipc.c
> @@ -1152,10 +1152,12 @@ int corosync_conn_send_response_no_fcc (
>       void *msg,
>       int mlen)
>  {
> +     int ret;
>       dont_call_flow_control = 1;
> -     corosync_conn_send_response (
> +     ret = corosync_conn_send_response (
>               conn, msg, mlen);
>       dont_call_flow_control = 0;
> +     return ret;
>  }
>  
>  int corosync_conn_send_response (
> diff --git a/exec/totemnet.c b/exec/totemnet.c
> index 57d84d3..05a198f 100644
> --- a/exec/totemnet.c
> +++ b/exec/totemnet.c
> @@ -227,6 +227,7 @@ static void totemnet_instance_initialize (struct 
> totemnet_instance *instance)
>       instance->my_memb_entries = 1;
>  }
>  
> +#undef log_printf
>  #define log_printf(level, format, args...) \
>      instance->totemnet_log_printf (__FILE__, __LINE__, level, format, ##args)
>  
> diff --git a/exec/totemsrp.c b/exec/totemsrp.c
> index fa3e68b..c296542 100644
> --- a/exec/totemsrp.c
> +++ b/exec/totemsrp.c
> @@ -608,6 +608,7 @@ struct message_handlers totemsrp_message_handlers = {
>  
>  static char *rundir = NULL;
>  
> +#undef log_printf
>  #define log_printf(level, format, args...) \
>      instance->totemsrp_log_printf (__FILE__, __LINE__, level, format, ##args)
>  
> diff --git a/include/corosync/engine/coroapi.h 
> b/include/corosync/engine/coroapi.h
> index 644fd4c..1692621 100644
> --- a/include/corosync/engine/coroapi.h
> +++ b/include/corosync/engine/coroapi.h
> @@ -165,6 +165,7 @@ typedef void (*object_notify_callback_fn_t)(unsigned int 
> object_handle,
>  
>  #endif /* OBJECT_PARENT_HANDLE_DEFINED */
>  
> +
>  struct corosync_api_v1 {
>       /*
>        * Object and configuration APIs
> diff --git a/lib/sa-confdb.h b/lib/sa-confdb.h
> index 69ed525..b05fece 100644
> --- a/lib/sa-confdb.h
> +++ b/lib/sa-confdb.h
> @@ -40,6 +40,8 @@ extern int confdb_sa_key_create(unsigned int 
> parent_object_handle, void *key_nam
>  extern int confdb_sa_key_delete(unsigned int parent_object_handle, void 
> *key_name, int key_name_len, void *value, int value_len);
>  extern int confdb_sa_key_get(unsigned int parent_object_handle, void 
> *key_name, int key_name_len, void *value, int *value_len);
>  extern int confdb_sa_key_replace(unsigned int parent_object_handle, void 
> *key_name, int key_name_len, void *old_value, int old_value_len, void 
> *new_value, int new_value_len);
> +extern int confdb_sa_key_increment(unsigned int parent_object_handle, void 
> *key_name, int key_name_len, unsigned int *value);
> +extern int confdb_sa_key_decrement(unsigned int parent_object_handle, void 
> *key_name, int key_name_len, unsigned int *value);
>  extern int confdb_sa_object_find(unsigned int parent_object_handle, unsigned 
> int *find_handle, unsigned int *object_handle, void *object_name, int 
> *object_name_len, int copy_name);
>  extern int confdb_sa_key_iter(unsigned int parent_object_handle, unsigned 
> int start_pos, void *key_name, int *key_name_len, void *value, int 
> *value_len);
>  extern int confdb_sa_find_destroy(unsigned int find_handle);
> diff --git a/services/confdb.c b/services/confdb.c
> index c49741d..bb0327f 100644
> --- a/services/confdb.c
> +++ b/services/confdb.c
> @@ -384,8 +384,6 @@ static void message_handler_req_lib_confdb_key_increment 
> (void *conn, void *mess
>  {
>       struct req_lib_confdb_key_get *req_lib_confdb_key_get = (struct 
> req_lib_confdb_key_get *)message;
>       struct res_lib_confdb_key_incdec res_lib_confdb_key_incdec;
> -     int value_len;
> -     void *value;
>       int ret = SA_AIS_OK;
>  
>       if 
> (api->object_key_increment(req_lib_confdb_key_get->parent_object_handle,
> @@ -404,8 +402,6 @@ static void message_handler_req_lib_confdb_key_decrement 
> (void *conn, void *mess
>  {
>       struct req_lib_confdb_key_get *req_lib_confdb_key_get = (struct 
> req_lib_confdb_key_get *)message;
>       struct res_lib_confdb_key_incdec res_lib_confdb_key_incdec;
> -     int value_len;
> -     void *value;
>       int ret = SA_AIS_OK;
>  
>       if 
> (api->object_key_decrement(req_lib_confdb_key_get->parent_object_handle,
> diff --git a/test/evsverify.c b/test/evsverify.c
> index 10a33f4..c6777e5 100644
> --- a/test/evsverify.c
> +++ b/test/evsverify.c
> @@ -112,7 +112,7 @@ struct evs_group groups[3] = {
>  
>  struct msg msg;
>  
> -char buffer[200000];
> +unsigned char buffer[200000];
>  int main (void)
>  {
>       evs_handle_t handle;
> @@ -121,7 +121,7 @@ int main (void)
>       int fd;
>       unsigned int member_list[32];
>       unsigned int local_nodeid;
> -     int member_list_entries = 32;
> +     unsigned int member_list_entries = 32;
>       struct msg msg;
>       hash_state sha1_hash;
>       struct iovec iov[2];

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to