Closed Bug 1297528 Opened 8 years ago Closed 8 years ago

remove some useless declarations in WebGLExtensionTextureFloat.cpp

Categories

(Core :: Graphics: CanvasWebGL, defect)

51 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox51 --- affected

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

(Keywords: clang-analyzer)

Attachments

(1 obsolete file)

Most of the assignation of swizzle are useless.
Summary: remove some useless declarations in ebGLExtensionTextureFloat.cpp → remove some useless declarations in WebGLExtensionTextureFloat.cpp
Assignee: nobody → sledru
Keywords: clang-analyzer
Attachment #8784151 - Flags: review?(jmuizelaar) → review?(jgilbert)
Comment on attachment 8784151 [details]
Bug 1297528 - Most of the assignations of 'swizzle' are useless.

https://reviewboard.mozilla.org/r/73676/#review71570

::: dom/canvas/WebGLExtensionTextureFloat.cpp
(Diff revision 1)
>      pi = {LOCAL_GL_LUMINANCE, LOCAL_GL_FLOAT};
>      dui = {pi.format, pi.format, pi.type};
> -    swizzle = nullptr;
>      if (needsSwizzle) {
>          dui = {LOCAL_GL_R32F, LOCAL_GL_RED, LOCAL_GL_FLOAT};
> -        swizzle = webgl::FormatUsageInfo::kLuminanceSwizzleRGBA;

The heck? No way!
Attachment #8784151 - Flags: review?(jgilbert) → review-
These are not actually unused.
The nullptr ones are likely redundant to the default value, but are useful for explicit readability.
The others should be being used, just maybe not on your OS/driver.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Comment on attachment 8784151 [details]
Bug 1297528 - Most of the assignations of 'swizzle' are useless.

https://reviewboard.mozilla.org/r/73676/#review71570

> The heck? No way!

Seems that it is a false positive of our tools. Sorry
Attachment #8784151 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: