Closed
Bug 1272930
Opened 8 years ago
Closed 8 years ago
Fix some -Wshadow warnings in dom/media/systemservices directory
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla49
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
5.38 KB,
patch
|
mozbugz
:
review+
|
Details | Diff | Splinter Review |
dom/media/systemservices/MediaSystemResourceManager.cpp:71:33 [-Wshadow] declaration shadows a local variable
dom/media/systemservices/MediaUtils.h:85:32 [-Wshadow] declaration shadows a local variable
dom/media/systemservices/MediaUtils.h:85:60 [-Wshadow] declaration shadows a local variable
dom/media/systemservices/MediaParent.cpp:250:19 [-Wshadow-local] declaration of 'buffer' shadows a previous local
dom/media/systemservices/MediaParent.cpp:258:18 [-Wshadow-compatible-local] declaration of 'count' shadows a previous local
dom/media/systemservices/MediaParent.cpp:259:18 [-Wshadow-compatible-local] declaration of 'rv' shadows a previous local
Attachment #8752529 -
Flags: review?(gsquelart)
Comment on attachment 8752529 [details] [diff] [review]
Wshadow_systemservices.patch
Review of attachment 8752529 [details] [diff] [review]:
-----------------------------------------------------------------
r+ if you read my rant. :-)
::: dom/media/systemservices/MediaUtils.h
@@ +82,5 @@
> class Functors : public FunctorsBase
> {
> public:
> + Functors(OnSuccessType&& aOnSuccessRef, OnFailureType&& aOnFailureRef)
> + : mOnSuccess(Move(aOnSuccessRef)), mOnFailure(Move(aOnFailureRef)) {}
The `Functors` class cannot access the `Then` function parameters&variables anyway, so there's no real shadowing happening.
But if that's needed to shut up the compiler, so be it!
Attachment #8752529 -
Flags: review?(gsquelart) → review+
Assignee | ||
Comment 3•8 years ago
|
||
Thanks. That's a good point. clang does seem to be a bit overzealous in this case.
status-firefox48:
--- → wontfix
status-firefox49:
--- → fixed
Comment 4•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•