[ofw] weird build issue

Tzachi Dar tzachid at mellanox.co.il
Wed Mar 5 00:44:36 PST 2008


I'm not sure what the exact problem, but I guess it is related to the
__ptr64 issue.

Please note that  ib_open_al() is defined as:

ib_api_status_t
ib_open_al(
		OUT			ib_al_handle_t* const
ph_al )

And ib_al_handle_t is defined as: 
typedef struct _ib_al* __ptr64			ib_al_handle_t;

In any case, I usually add the following pragma:

#pragma warning(disable: 4244 ) 

And just forgets about the whole issue.

Thanks
Tzachi

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Wednesday, March 05, 2008 10:26 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] weird build issue
> 
> Does anyone have any ideas why the following code may not 
> build in 32-bit mode, but does in 64-bit mode?
> 
> ib_al_handle_t hal;
> 
> ib_open_al(&hal);
> 
> I see code in several places in the winof tree where this 
> sort of code builds fine.  And I can get it to build if I add 
> it to a test program, but it fails when I try to build it as 
> part of the winverbs dll.
> 
> The actual error is:
> 
> core\winverbs\user\wv_provider.cpp(73) : error C2220: warning 
> treated as error - no object file generated
> core\winverbs\user\wv_provider.cpp(73) : error C4244: 
> 'argument' : conversion from 'ib_al_handle_t * ' to 
> 'ib_al_handle_t *const  ', possible loss of data
> 
> Lowering the warning level to 2 allows the build to continue, 
> but I'd really like to understand exactly what the warning is 
> warning against...
> 
> - Sean
> 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 



More information about the ofw mailing list