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

Hal Rosenstock hal.rosenstock at gmail.com
Sat Jun 13 07:58:51 PDT 2009


On Sat, Jun 13, 2009 at 6:36 AM, Sasha Khapyorsky<sashak at voltaire.com> wrote:
> 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)?

I'll do it that way (in the next patch version).

-- Hal

>
> Sasha
>
>>       return 0;
>>  }
>>
>>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>



More information about the general mailing list