Last Comment Bug 662258 - GCC warning about BasicThebesLayerBuffer::CreateBuffer getting hidden by ShadowThebesLayerBuffer::CreateBuffer
: GCC warning about BasicThebesLayerBuffer::CreateBuffer getting hidden by Shad...
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla9
Assigned To: Benoit Jacob [:bjacob] (mostly away)
: Milan Sreckovic [:milan]
Depends on:
Blocks: buildwarning 635373
  Show dependency treegraph
Reported: 2011-06-06 05:57 PDT by Benoit Jacob [:bjacob] (mostly away)
Modified: 2011-09-25 06:22 PDT (History)
3 users (show)
emorley: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

fix warning (808 bytes, patch)
2011-06-06 06:01 PDT, Benoit Jacob [:bjacob] (mostly away)
roc: review+
Details | Diff | Splinter Review

Description User image Benoit Jacob [:bjacob] (mostly away) 2011-06-06 05:57:14 PDT
I get this warning with GCC 4.5.3:

/home/bjacob/mozilla-central-mobile/gfx/layers/basic/BasicLayers.cpp:672: warning: 'virtual already_AddRefed<gfxASurface> mozilla::layers::BasicThebesLayerBuffer::CreateBuffer(gfxASurface::gfxContentType, const nsIntSize&, PRUint32)' was hidden
/home/bjacob/mozilla-central-mobile/gfx/layers/basic/BasicLayers.cpp:2329: warning:   by 'virtual already_AddRefed<gfxASurface> mozilla::layers::ShadowThebesLayerBuffer::CreateBuffer(gfxASurface::gfxContentType, const nsIntSize&)'

It doesn't seem dangerous as there are no optional arguments here, so it doesn't seem like this could cause a different method to be called than what is intended, but still, it's worth fixing.
Comment 1 User image Benoit Jacob [:bjacob] (mostly away) 2011-06-06 06:01:06 PDT
In ThebesLayerBuffer.h I see:

  virtual already_AddRefed<gfxASurface>
  CreateBuffer(ContentType aType, const nsIntSize& aSize, PRUint32 aFlags) = 0;

So my understanding is that this method is intended to take a aFlags argument.

Attached patch adds a PRUint32 argument to the method in question; also since it was a dummy method doing nothing, it makes them non-named arguments which will avoid unused-argument warnings.
Comment 2 User image Benoit Jacob [:bjacob] (mostly away) 2011-06-06 06:01:36 PDT
Created attachment 537540 [details] [diff] [review]
fix warning
Comment 3 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2011-06-06 16:34:23 PDT
Comment on attachment 537540 [details] [diff] [review]
fix warning

Review of attachment 537540 [details] [diff] [review]:
Comment 4 User image Daniel Holbert [:dholbert] 2011-07-05 13:04:10 PDT
bjacob: looks like you're clear to land this, right?
Comment 5 User image Ed Morley [:emorley] 2011-08-26 18:01:24 PDT
Happy for me to land this?
Comment 7 User image Ed Morley [:emorley] 2011-09-25 06:22:48 PDT

Note You need to log in before you can comment on or make changes to this bug.