Closed Bug 662258 Opened 8 years ago Closed 8 years ago

GCC warning about BasicThebesLayerBuffer::CreateBuffer getting hidden by ShadowThebesLayerBuffer::CreateBuffer

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: bjacob, Assigned: bjacob)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

I get this warning with GCC 4.5.3:

ThebesLayerOGL.cpp
/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.
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.
Attached patch fix warningSplinter Review
Attachment #537540 - Flags: review?(roc)
Comment on attachment 537540 [details] [diff] [review]
fix warning

Review of attachment 537540 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #537540 - Flags: review?(roc) → review+
bjacob: looks like you're clear to land this, right?
Blocks: buildwarning
Whiteboard: [build_warning]
Version: unspecified → Trunk
Assignee: nobody → bjacob
Status: NEW → ASSIGNED
Happy for me to land this?
https://hg.mozilla.org/mozilla-central/rev/e63de88c5780
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.