Closed Bug 1117594 Opened 5 years ago Closed 5 years ago
|technique| can be used when uninitialized in Image
Layer D3D10::Render Layer()
cppcheck reports this: > gfx/layers/d3d10/ImageLayerD3D10.cpp:313: error: Uninitialized variable: technique If image->GetFormat() is one of CAIRO_SURFACE, D3D9_RGB32_TEXTURE or PLANAR_YCBCR then |technique| will be initialized. Otherwise, it won't be. I see two possibilities: - This is a real defect. - This is not a real defect because the three above are the only possible values. If so, it would be good to add an |else| branch that crashes, or something like that, to make things clearer. Especially given that this is a large function with complex control flow. I've marked this bug as security-sensitive to be cautious, but that may be overkill.
bas, what do you think? Is it a real defect?
(In reply to Nicholas Nethercote [:njn] from comment #1) > bas, what do you think? Is it a real defect? Off the top of my head these are the only possible options. But it would probably be good to assert this or even as you suggested MOZ_CRASH. Especially in case someone changes this in the future.
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
This bug probably doesn't need the s-s tag any more, but I don't have permission to remove it.
Attachment #8543742 - Flags: review?(bas) → review+
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.