Closed Bug 605462 Opened 14 years ago Closed 14 years ago

WebGLContextGL.cpp:3248: warning: unused variable 'debugFlags'

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: bjacob)

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

/builds/slave/mozilla-central-linux-debug/build/content/canvas/src/WebGLContextGL.cpp: In member function 'virtual nsresult mozilla::WebGLContext::CompileShader(nsIWebGLShader*)':
/builds/slave/mozilla-central-linux-debug/build/content/canvas/src/WebGLContextGL.cpp:3248: warning: unused variable 'debugFlags'

Relevant code:
3245 #if defined(USE_ANGLE)
3246     if (shader->NeedsTranslation() && mShaderValidation) {
3247         ShHandle compiler = 0;
3248         int debugFlags = 0;
http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContextGL.cpp#3248

bug 602396 removed the last mention of this variable, so its declaration should go away too.
Whiteboard: [build_warning]
Attached patch fix warningSplinter Review
Assignee: nobody → bjacob
Attachment #484321 - Flags: review?(dholbert)
Comment on attachment 484321 [details] [diff] [review]
fix warning

># HG changeset patch
># Parent ae48ff85d4b29a920e4fd7251c670e61fc8f3de0
>diff --git a/content/canvas/src/WebGLContextGL.cpp b/content/canvas/src/WebGLContextGL.cpp
>--- a/content/canvas/src/WebGLContextGL.cpp
>+++ b/content/canvas/src/WebGLContextGL.cpp
>@@ -3248,17 +3248,16 @@ WebGLContext::CompileShader(nsIWebGLShad
>     WebGLuint shadername;
>     if (!GetConcreteObjectAndGLName("compileShader", sobj, &shader, &shadername))
>         return NS_OK;
>     MakeContextCurrent();
> 
> #if defined(USE_ANGLE)
>     if (shader->NeedsTranslation() && mShaderValidation) {
>         ShHandle compiler = 0;
>-        int debugFlags = 0;
>         ShBuiltInResources resources;
>         memset(&resources, 0, sizeof(ShBuiltInResources));
> 
>         resources.MaxVertexAttribs = mGLMaxVertexAttribs;
>         resources.MaxVertexUniformVectors = mGLMaxVertexUniformVectors;
>         resources.MaxVaryingVectors = mGLMaxVaryingVectors;
>         resources.MaxVertexTextureImageUnits = mGLMaxVertexTextureImageUnits;
>         resources.MaxCombinedTextureImageUnits = mGLMaxTextureUnits;
Attachment #484321 - Flags: review?(dholbert) → review+
oops, sorry for the unnecessarily attachment-quoting bugspam. :)

r=dholbert, thanks for fixing.
Status: NEW → ASSIGNED
Attachment #484321 - Flags: approval2.0+
http://hg.mozilla.org/mozilla-central/rev/9266b82f502e
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: