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

Paul Gofman gofmanp at gmail.com
Thu Nov 9 16:12:05 CST 2017


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?




More information about the wine-devel mailing list