[ofw] Problem in building opensm with the 6001 compiler

Smith, Stan stan.smith at intel.com
Thu Sep 2 09:13:07 PDT 2010


Hefty, Sean wrote:
>>   A pointer to the actual context of the request (a copy of the
>>   original request structure) is attached as the p_madw-
>>> context.ni_context.node_guid
>
> Also see this comment:
>
>       /*
>          Provide MAD context such that the call back will know what to do.
>          We have to keep the entire request structure so we know the CB.
>          Since we can not rely on the client to keep it around until
>          the response - we duplicate it and will later dispose it (in CB).
>          To store on the MADW we cast it into what opensm has:
>          p_madw->context.ni_context.node_guid
>        */
>       p_query_req_copy = malloc(sizeof(*p_query_req_copy));
>       if (!p_query_req_copy) {
>               OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 5511: "
>                       "Unable to acquire memory for query copy\n");
>               osm_mad_pool_put(p_bind->p_mad_pool, p_madw);
>               status = IB_INSUFFICIENT_RESOURCES;
>               goto Exit;
>       }
>       *p_query_req_copy = *p_query_req;
>       p_madw->context.ni_context.node_guid =
>           (ib_net64_t) (long)p_query_req_copy;
>
> The (long) cast should probably be (uintptr_t) when saving and
> restoring the pointer. _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw


Which WDK are you using?
Which build are you seeing this as I do not see it when building with 'latest' MS WDK 7600.16385.1.
I agree that uintptr_t is the portable way to go.
Will address.

stan.




More information about the ofw mailing list