Bug 41023 - [PATCH] d3d1x: error when building -> src/dxgi_native.cpp:1165:40: error: uninitialized const ‘black’
Summary: [PATCH] d3d1x: error when building -> src/dxgi_native.cpp:1165:40: error: uni...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other All
: medium major
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 19:56 UTC by Alexandre Demers
Modified: 2011-10-07 16:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Initializing "black" union (679 bytes, patch)
2011-09-20 09:44 UTC, Alexandre Demers
Details | Splinter Review
Fix error caused by uninitialized union (1.20 KB, patch)
2011-09-20 10:06 UTC, Alexandre Demers
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.