Closed
Bug 1780803
Opened 2 years ago
Closed 2 years ago
Potentially uninitialized enum in GLBlitHelpers
Categories
(Core :: Graphics, defect, P3)
Core
Graphics
Tracking
()
RESOLVED
FIXED
105 Branch
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
Details
(Keywords: coverity)
Attachments
(1 file)
From a coverity alert. I think that it is pretty benign but it's also simple to work around and it's good to keep the volume of static analysis warnings in check.
*** CID 1417352: Uninitialized variables (UNINIT)
/gfx/gl/GLBlitHelper.cpp: 242 in mozilla::gl::ScopedSaveMultiTex::ScopedSaveMultiTex(mozilla::gl::GLContext *, unsigned char, unsigned int)()
236 for (uint8_t i = 0; i < mTexCount; i++) {
237 mGL.fActiveTexture(LOCAL_GL_TEXTURE0 + i);
238 if (mGL.IsSupported(GLFeature::sampler_objects)) {
239 mOldTexSampler[i] = mGL.GetIntAs<GLuint>(LOCAL_GL_SAMPLER_BINDING);
240 mGL.fBindSampler(i, 0);
241 }
>>> CID 1417352: Uninitialized variables (UNINIT)
>>> Using uninitialized value "texBinding" when calling "GetIntAs".
242 mOldTex[i] = mGL.GetIntAs<GLuint>(texBinding);
243 }
244 }
245
246 ScopedSaveMultiTex::~ScopedSaveMultiTex() {
247 for (uint8_t i = 0; i < mTexCount; i++) {
Assignee | ||
Comment 1•2 years ago
|
||
Addresses a coverity warning. The problem looks very benign but the work around is simple and it's good to keep the volume static analysis warnings in check.
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4cb8944a8566 Avoid uninitialized enum in error path. r=gfx-reviewers,jgilbert
Comment 3•2 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox105:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•