Closed Bug 1344812 Opened 3 years ago Closed 3 years ago

Fix clang 5.0 warnings for ClearKeySessionManager.cpp: [-Wunused-lambda-capture] lambda capture 'sessionId' is not used

Categories

(Core :: Audio/Video: GMP, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox54 --- wontfix
firefox55 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

clang trunk has added a new build warning "-Wunused-lambda-capture" for variables captured by lambda functions & then unused.

Filing this bug for 3 instances in GMP's C++ file ClearKeySessionManager.cpp
{
media/gmp-clearkey/0.1/ClearKeySessionManager.cpp:235:37 [-Wunused-lambda-capture] lambda capture 'sessionId' is not used
media/gmp-clearkey/0.1/ClearKeySessionManager.cpp:589:49 [-Wunused-lambda-capture] lambda capture 'sessionId' is not used
media/gmp-clearkey/0.1/ClearKeySessionManager.cpp:597:48 [-Wunused-lambda-capture] lambda capture 'sessionId' is not used
}

Historical note: it looks like these variables were already unused in the commit that added these lambda functions, back in bug 1318965.[1][2][3]  (Perhaps they were used in an initial version of that patch, but ended up unused in the final version.)  --> Adding dependency on that bug.

In any case, clearly we don't need to capture them now.

[1] https://hg.mozilla.org/integration/mozilla-inbound/rev/fe0662dd0b839b00710eae1a7a4452625027a03a#l14.280
[2] https://hg.mozilla.org/integration/mozilla-inbound/rev/fe0662dd0b839b00710eae1a7a4452625027a03a#l14.678
[3] https://hg.mozilla.org/integration/mozilla-inbound/rev/fe0662dd0b839b00710eae1a7a4452625027a03a#l14.686
Comment on attachment 8844095 [details]
Bug 1344812: Remove variable "sessionId" from lambda-captures where it's not used, in ClearKeySessionManager.cpp.

https://reviewboard.mozilla.org/r/117626/#review119326

Thanks!
Attachment #8844095 - Flags: review?(cpearce) → review+
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b83517442e40
Remove variable "sessionId" from lambda-captures where it's not used, in ClearKeySessionManager.cpp. r=cpearce
Rank: 25
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/b83517442e40
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.