Closed Bug 859517 Opened 12 years ago Closed 12 years ago

LayerManagerOGL.cpp:676:68: warning: 'visibility' attribute ignored [-Wattributes]

Categories

(Core :: Graphics, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Build warning: { /gfx/layers/opengl/LayerManagerOGL.cpp: In member function 'bool mozilla::layers::LayerManagerOGL::Initialize(nsRefPtr<mozilla::gl::GLContext>, bool)': gfx/layers/opengl/LayerManagerOGL.cpp:676:68: warning: 'visibility' attribute ignored [-Wattributes] } As described in bug 832456 and bug 574430, we hit this build warning when we define a class inside of a function, and label one of its methods as NS_IMETHOD. If we move the class definition out of the function, then all is well. [looks like this runnable was added in https://hg.mozilla.org/mozilla-central/rev/32fcf3259a47 for Bug 717958, about a year ago -- adding dependency on that bug.]
Attached patch fix v1Splinter Review
Looks like this helper-class needs to be declared inside the scope of LayerManagerOGL, since it makes use of LayerManagerOGL's private static variables. This patch declares it in the 'private' block of LayerManagerOGL, adds MOZ_FINAL and MOZ_OVERRIDE keywords, and keeps the Run() impl in LayerManagerOGL.cpp, just above Initialize() instead of inside of it.
Attachment #734838 - Flags: review?(bgirard)
Comment on attachment 734838 [details] [diff] [review] fix v1 Review of attachment 734838 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #734838 - Flags: review?(bgirard) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: