Bug 41023

Summary: [PATCH] d3d1x: error when building -> src/dxgi_native.cpp:1165:40: error: uninitialized const ‘black’
Product: Mesa Reporter: Alexandre Demers <alexandre.f.demers>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: e0425955
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Initializing "black" union
Fix error caused by uninitialized union

Description Alexandre Demers 2011-09-19 19:56:51 UTC
When enabling d3d1x state tracker, I receive the following error:
src/dxgi_native.cpp:1165:40: error: uninitialized const ‘black’

So either black shouldn't be a "const" or it should be initialized, which seems to be the problem.
Comment 1 Alexandre Demers 2011-09-20 09:22:30 UTC
Error introduced by:

commit 6dd284f7c8fac22f64c13fdf9909094f5ec59086
gallium: move clear paths from rgba to a pointer to a color union (v2)
Dave Airlie<airlied@redhat.com>
11-09-16 4:39 AM


It seems moving from an initialized array of floats to an uninitialized union broke the compilation.
Comment 2 Alexandre Demers 2011-09-20 09:44:39 UTC
Created attachment 51410 [details] [review]
Initializing "black" union

If I understood correctly unions and how to initialize them, it should fix the compilation error and initialize values to 0 for any of the types. Correct me if I'm wrong.
Comment 3 Alexandre Demers 2011-09-20 10:06:24 UTC
Created attachment 51413 [details] [review]
Fix error caused by uninitialized union

V2 of the previous patch. Correctly formatted the patch.
Comment 4 Alexandre Demers 2011-09-21 17:31:49 UTC
How and who should I ask review to? Is there a way to identify the person best placed to review my patch? Thansk.
Comment 5 Lucas Stach 2011-09-21 23:24:51 UTC
Calim is probably the only person currently interested in this statetracker. Adding him to CC.
Comment 6 Alexandre Demers 2011-10-07 16:59:27 UTC
closing the bug. The fix was included in commit 5def3b7be142cfc6bbb1534bd0557c5f324de8c0 by Christoph Bumiller<e0425955@student.tuwien.ac.at>.

Tested by Alexandre Demers on October 7th, 2011

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.