[Openais] [PATCH corosync] Remove the remaining warnings.

Steven Dake sdake at redhat.com
Wed Mar 10 16:07:56 PST 2010


good for merge

On Thu, 2010-03-11 at 11:11 +1100, Angus Salkeld wrote:
> corosync now builds with:
> ./configure --enable-fatal-warnings --disable-nss
> 
> Note there seems to be some warnings in nss headers.
> 
> -Angus
> 
> Signed-off-by: Angus Salkeld <asalkeld at redhat.com>
> ---
>  include/corosync/engine/coroapi.h |   10 ++++++----
>  services/cpg.c                    |    2 +-
>  tools/corosync-keygen.c           |    2 +-
>  tools/corosync-objctl.c           |    4 ++--
>  4 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/include/corosync/engine/coroapi.h b/include/corosync/engine/coroapi.h
> index b3c9777..7639ab1 100644
> --- a/include/corosync/engine/coroapi.h
> +++ b/include/corosync/engine/coroapi.h
> @@ -653,6 +653,11 @@ struct corosync_service_engine_iface_ver0 {
>          struct corosync_service_engine *(*corosync_get_service_engine_ver0) (void);
>  };
>  
> +typedef void (*sync_init_v1_fn_t) (
> +		const unsigned int *member_list,
> +		size_t member_list_entries,
> +		const struct memb_ring_id *ring_id) ;
> +
>  struct corosync_service_engine {
>  	const char *name;
>  	unsigned short id;
> @@ -679,10 +684,7 @@ struct corosync_service_engine {
>  		const unsigned int *joined_list, size_t joined_list_entries,
>  		const struct memb_ring_id *ring_id);
>  	enum cs_sync_mode sync_mode;
> -	void (*sync_init) (
> -		const unsigned int *member_list,
> -		size_t member_list_entries,
> -		const struct memb_ring_id *ring_id);
> +	sync_init_v1_fn_t sync_init;
>  	int (*sync_process) (void);
>  	void (*sync_activate) (void);
>  	void (*sync_abort) (void);
> diff --git a/services/cpg.c b/services/cpg.c
> index 7b57d57..ede426f 100644
> --- a/services/cpg.c
> +++ b/services/cpg.c
> @@ -338,7 +338,7 @@ struct corosync_service_engine cpg_service_engine = {
>  	.exec_engine				= cpg_exec_engine,
>  	.exec_engine_count		        = sizeof (cpg_exec_engine) / sizeof (struct corosync_exec_handler),
>  	.sync_mode				= CS_SYNC_V1_APIV2,
> -	.sync_init                              = cpg_sync_init_v2,
> +	.sync_init                              = (sync_init_v1_fn_t)cpg_sync_init_v2,
>  	.sync_process                           = cpg_sync_process,
>  	.sync_activate                          = cpg_sync_activate,
>  	.sync_abort                             = cpg_sync_abort
> diff --git a/tools/corosync-keygen.c b/tools/corosync-keygen.c
> index 96966a6..c842fd1 100644
> --- a/tools/corosync-keygen.c
> +++ b/tools/corosync-keygen.c
> @@ -86,7 +86,7 @@ retry_read:
>  	}
>  	bytes_read += res;
>  	if (bytes_read != sizeof (key)) {
> -		printf ("Press keys on your keyboard to generate entropy (bits = %d).\n", bytes_read * 8);
> +		printf ("Press keys on your keyboard to generate entropy (bits = %d).\n", (int)(bytes_read * 8));
>  		goto retry_read;
>  	}
>  	close (random_fd);
> diff --git a/tools/corosync-objctl.c b/tools/corosync-objctl.c
> index 8e2d754..bcec710 100644
> --- a/tools/corosync-objctl.c
> +++ b/tools/corosync-objctl.c
> @@ -123,11 +123,11 @@ static void print_key (char *key_name, void *value, size_t value_len, confdb_val
>  					  *(uint32_t*)value);
>  			break;
>  		case CONFDB_VALUETYPE_INT64:
> -			printf ("%s=%lld\n", key_name,
> +			printf ("%s=%"PRIu64"\n", key_name,
>  					  *(int64_t*)value);
>  			break;
>  		case CONFDB_VALUETYPE_UINT64:
> -			printf ("%s=%llu\n", key_name,
> +			printf ("%s=%"PRIi64"\n", key_name,
>  					  *(uint64_t*)value);
>  			break;
>  		case CONFDB_VALUETYPE_STRING:



More information about the Openais mailing list