d3dx9_36: Silence an uninitialized compiler warning (GCC 8).

Gerald Pfeifer gerald at pfeifer.com
Thu Nov 9 14:39:04 CST 2017


On Wed, 8 Nov 2017, Paul Gofman wrote:
> There is actually no usage of uninitialized variable there, though it is 
> probably not exactly straightforward for compiler to guess. Why it does 
> not complain that 'cdesc[index]' may be used uninitialized while it is 
> handled the same way?

Yes, I did not find this really being used uninitialized (and, yes,
you're right, it actually does complain about cdesc[index] as well
-- those were the other warnings I referred to, where I did not have
a fix/workaround yet).

> If still to change that, does the attached patch fixes the warning as well
> (sorry, I don't have gcc 8 in hands to test)? If yes, I would suggest that
> would be a tiny bit nicer way to silence the warning.

Yes, it does, plus -- unlike my patch -- it also addresses the other
warnings, so indeed it's also more effective.

On Wed, 8 Nov 2017, Matteo Bruni wrote:
> If that works it would be preferable to me too.

Same here. :-)  Can we go with your patch, Paul?

Thanks,
Gerald



More information about the wine-devel mailing list