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

Matteo Bruni matteo.mystral at gmail.com
Thu Nov 9 16:46:17 CST 2017


2017-11-09 23:12 GMT+01:00 Paul Gofman <gofmanp at gmail.com>:
> On 11/09/2017 11:39 PM, Gerald Pfeifer wrote:
>>
>> 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).
>>
> I suppose cdesc[index] can be zeroed on error in the same function which
> fills it, but in my understanding the wined3d style did not approve
> redundant zero initializations (unless I missed anything here), including
> auto variables and redundant HEAP_ZERO_MEMORY flag to HeapAlloc(). So what
> should happen now to the code already there and new patches if gcc 8 starts
> issuing this warning false positive? Could it be just a bug which will be
> fixed in gcc maybe?

If I understood Gerald's email correctly, those other warnings are
also fixed by your patch. BTW, could you please send it as a proper
patch to wine-patches? It would be helpful :)



More information about the wine-devel mailing list