Re: [AD] microscopic issues compiling 4.1.13 with latest MinGW packages

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou:
> Yes, they are harmless.  They occur with arguments passed to a function with
> a slightly different type than their original type (e.g. cast to LPVOID or 
> cast to a base structure).  You can shut them up by going through the 
> appropriate temporary, which will be eliminated by the optimizer.

Could you give an example? What would you change the following into:

RECT dest_rect;
ClientToScreen(allegro_wnd, (LPPOINT)&dest_rect);

I tried using a union, which seems to work:

union
{
     RECT *first;
     LPPOINT second;
} dest_rect;

ClientToScreen(allegro_wnd, dest_rect.second);


Kind regards,
Daniel Schlyder
--
http://bitblaze.com/





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/