New valgrind warnings in wined3d/arb_program_shader.c

Dan Kegel dank at kegel.com
Fri Aug 1 07:32:54 CDT 2008


Stefan Dösinger <stefan at codeweavers.com> wrote:
> Does the attached patch fix the warnings?

It had a level of indirection mistake, but yes, the
following patch fixes the new warnings:

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index a9fc780..6e1e0ac 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -1790,6 +1790,7 @@ void gen_ffp_op(IWineD3DStateBlockImpl
*stateblock, struct ffp_settings *setting
     DWORD ttff;
     DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;

+    memset(settings, 0, sizeof(*settings));
     for(i = 0; i < GL_LIMITS(texture_stages); i++) {
         IWineD3DBaseTextureImpl *texture;
         if(stateblock->textureState[i][WINED3DTSS_COLOROP] ==
WINED3DTOP_DISABLE) {



More information about the wine-devel mailing list