[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: dlls/winex11.drv/dib.c: initialize two warnings (RESEND)
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2009-10-31 21:00:41
Message-ID: 87k4ybcm86.fsf () wine ! dyndns ! org
[Download RAW message or body]

Gerald Pfeifer <gerald@pfeifer.com> writes:

> I looked into this in more detail, and now remember why I couldn't
> do this.
>
> From X11DRV_GetDIBits() we invoke DIB_GetBitmapInfo() with these
> two variables being passed by addresses which in turns forwards to 
> DIB_GetBitmapInfoEx().  And there we have a default case of
>
>     ERR("(%d): unknown/wrong size for header\n", header->biSize );
>     return -1;
>
> where indeed height and width are not initialized, so GCC 4.5 is right.

No, because the error case causes the caller function to return without
using them. The idea was to reorder the code so that gcc can figure this
out, as it does already in the other cases.

-- 
Alexandre Julliard
julliard@winehq.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic