[go: nahoru, domu]

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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox48 --- wontfix
firefox49 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

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+
Thanks. That's a good point. clang does seem to be a bit overzealous in this case.
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.

Attachment

General

Created:
Updated:
Size: