Closed
Bug 874736
Opened 11 years ago
Closed 11 years ago
98 lines of GCC build warnings from -Woverloaded-virtual in gfx/layers/composite, due to two CompositableHost::EnsureTextureHost methods
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 876661
People
(Reporter: dholbert, Assigned: Six)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
17.16 KB,
text/plain
|
Details | |
3.43 KB,
patch
|
nical
:
review+
|
Details | Diff | Splinter Review |
I get nearly 100 lines of GCC buildwarning spam in gfx/layers/composite, from -Woverloaded-virtual. The warnings look like: { In file included from /scratch/work/builds/mozilla-inbound/mozilla/gfx/layers/composite/CompositableHost.cpp:6:0: /scratch/work/builds/mozilla-inbound/mozilla/gfx/layers/composite/CompositableHost.h:153:16: warning: ‘virtual void mozilla::layers::CompositableHost::EnsureTextureHost(mozilla::layers::ISurfaceAllocator*, const mozilla::layers::TextureInfo&, const nsIntRect&)’ was hidden [-Woverloaded-virtual] In file included from /scratch/work/builds/mozilla-inbound/mozilla/gfx/layers/composite/CompositableHost.cpp:7:0: /scratch/work/builds/mozilla-inbound/mozilla/gfx/layers/composite/ImageHost.h:51:16: warning: by ‘virtual void mozilla::layers::ImageHostSingle::EnsureTextureHost(mozilla::layers::TextureIdentifier, const mozilla::layers::SurfaceDescriptor&, mozilla::layers::ISurfaceAllocator*, const mozilla::layers::TextureInfo&)’ [-Woverloaded-virtual] } http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings has an explanation for what's going on here. IIRC you can suppress these warnings by adding a "using CompositableHost::EnsureTextureHost;" declaration to the affected classes.
Reporter | ||
Comment 1•11 years ago
|
||
Attaching a log of all these warnings.
Reporter | ||
Comment 2•11 years ago
|
||
Looks like this was introduced a week ago by http://hg.mozilla.org/mozilla-central/rev/a1bb5799f8ee which added the second EnsureTextureHost declaration. I'm using GCC 4.8, BTW (though I think this affects all GCC versions; not sure about other compilers).
Blocks: 870211, buildwarning
Summary: 98 lines of GCC build warnings from -Woverloaded-virtual in gfx/layers/composite/ → 98 lines of GCC build warnings from -Woverloaded-virtual in gfx/layers/composite, due to two CompositableHost::EnsureTextureHost methods
Assignee | ||
Comment 3•11 years ago
|
||
Looks ok on my linux64
Assignee: nobody → six.dsn
Status: NEW → ASSIGNED
Attachment #759171 -
Flags: review?(nical.bugzilla)
Comment 4•11 years ago
|
||
Comment on attachment 759171 [details] [diff] [review] Annotate "using CompositableHost::EnsureTextureHost;" to fix warnings with -Woverloaded-virtual in gfx/layers/composite Review of attachment 759171 [details] [diff] [review]: ----------------------------------------------------------------- Looks like a good short term solution although it can probably be a bit confusing since it's a rather unusual pattern. The work I am doing on textures gets rid of EnsureTextureHost so this confusion about overloaded virtual methods will not stay in the code for too long (hopefully).
Attachment #759171 -
Flags: review?(nical.bugzilla) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac18c74b3a2c
Keywords: checkin-needed
Assignee | ||
Comment 6•11 years ago
|
||
daniel could you try the patch to confirm it is gone away on your machine?
Flags: needinfo?(dholbert)
Reporter | ||
Comment 7•11 years ago
|
||
I actually don't get the build warning in up-to-date mozilla-central now (without this bug's patch -- I verified that my clone doesn't have the cset from comment 5). So something else apparently fixed this (without the "using" declaration) -- looks like it was bug 876661 (which was really a dupe of this bug). The patch there took a different approach -- renaming one of the methods. I'm forward-duping this to that bug, and we should back out comment 5, since we don't need the "using" declaration now.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(dholbert)
Resolution: --- → DUPLICATE
Reporter | ||
Comment 8•11 years ago
|
||
Backed out: https://hg.mozilla.org/integration/mozilla-inbound/rev/0ae723d89b73 Thanks anyway for taking this, Arnaud, and sorry for the confusion!
Assignee | ||
Comment 9•11 years ago
|
||
OK if it's fixed it's okay for me even if it's not my patch that is being used :)
You need to log in
before you can comment on or make changes to this bug.
Description
•