New dlls/ddraw/device.c warnings
Stefan Dösinger
stefandoesinger at gmx.at
Mon Jun 26 16:18:43 CDT 2006
Am Montag 26 Juni 2006 19:13 schrieben Sie:
> After the recent sets of changes, I found that GCC 3.4 issues the
> following warnings (on FreeBSD 5.4.
>
> I checked and depending on how a compiler implements assert(), the
> warnings are valid, insofar as the compiler doesn't have a way to
> automatically determine that all code paths are covered:
>
> device.c: In function `Thunk_IDirect3DDeviceImpl_2_Begin':
> device.c:1826: warning: 'FVF' might be used uninitialized in this
> function device.c: In function `Thunk_IDirect3DDeviceImpl_2_BeginIndexed':
> device.c:1886: warning: 'FVF' might be used uninitialized in this function
> device.c: In function `Thunk_IDirect3DDeviceImpl_2_DrawPrimitive':
> device.c:2752: warning: 'FVF' might be used uninitialized in this function
> device.c: In function `Thunk_IDirect3DDeviceImpl_2_DrawIndexedPrimitive':
> device.c:2891: warning: 'FVF' might be used uninitialized in this function
>
> Could you have a look into this, Stefan? If someone has a hint on
> the preferred approach to address this, I can give it a try as well.
This seems to be a clear case of 'stupid compiler'. The assert(0) in the
default case of the switch statement will terminate the app, but it the
compiler thinks that the call below will be called. I sent a fix which
replaces the assertions by an ERR log and an error return to wine-patches
Thanks for the hint
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060626/9ce93d59/attachment-0001.pgp
More information about the wine-devel
mailing list