On Thu, Feb 26, 2009 at 11:02:19PM +0200, Sasha Khapyorsky wrote:

> > -           size = mk_reply(attr, mad + IB_VENDOR_RANGE2_DATA_OFFS,
> > +           size = mk_reply(attr, (char *) mad + IB_VENDOR_RANGE2_DATA_OFFS,
> 
> What is the reason for such void * to char * casting?

Math on void* pointers is a gcc extension, I'm surprised you don't get
warnings on linux - it is worth figuring out how to turn those on..

Sean: For this purpose casting to (char *) is somewhat sketchy, it
should be (uint8_t *).. char should only ever be used for strings due
to possible troubles with environments using 16 bit chars for wide
character support.

Jason
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to