The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla9

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bjacob, Assigned: bjacob)

Tracking

(Blocks: 1 bug)

Trunk
mozilla9
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment)

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.
(Assignee)

Comment 1

6 years ago
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.
(Assignee)

Comment 2

6 years ago
Created attachment 537540 [details] [diff] [review]
fix warning
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: 187528
Whiteboard: [build_warning]
Version: unspecified → Trunk
Assignee: nobody → bjacob
Status: NEW → ASSIGNED
Happy for me to land this?
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/e63de88c5780
Keywords: checkin-needed
Target Milestone: --- → mozilla9
https://hg.mozilla.org/mozilla-central/rev/e63de88c5780
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.