[ofa-general] Re: [PATCH] libibmad/resolve.c: Remove compile warning on x86_64 arch

Sasha Khapyorsky sashak at voltaire.com
Sat Jun 13 03:36:45 PDT 2009


On 07:46 Mon 01 Jun     , hnrose at comcast.net wrote:
> 
> resolve.c:106: warning: pointer targets in passing argument 1 of 'mad_decode_field' differ in signedness
> 
> Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
> 
> diff --git a/libibmad/src/resolve.c b/libibmad/src/resolve.c
> index f17da11..abcab17 100644
> --- a/libibmad/src/resolve.c
> +++ b/libibmad/src/resolve.c
> @@ -103,7 +103,7 @@ int ib_resolve_guid_via(ib_portid_t * portid, uint64_t * guid,
>  			       buf)) < 0)
>  		return -1;
>  
> -	mad_decode_field(buf, IB_SA_PR_SL_F, &portid->sl);
> +	mad_decode_field((uint8_t *)buf, IB_SA_PR_SL_F, &portid->sl);

Why to not change type of buf and eliminate casting (and warning)?

Sasha

>  	return 0;
>  }
>  
> 



More information about the general mailing list