Closed Bug 1344816 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: DOM: Device Interfaces, enhancement)

enhancement
Not set
normal

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 4 instances of this in U2F.cpp: { dom/u2f/U2F.cpp:717:19 [-Wunused-lambda-capture] lambda capture 'this' is not used dom/u2f/U2F.cpp:723:19 [-Wunused-lambda-capture] lambda capture 'this' is not used dom/u2f/U2F.cpp:903:19 [-Wunused-lambda-capture] lambda capture 'this' is not used dom/u2f/U2F.cpp:909:19 [-Wunused-lambda-capture] lambda capture 'this' is not used } Presumably we're just capturing "this" out of habit, so that we *could* use member-vars & member-functions from these lambdas. However, we don't use that member stuff, so there's no benefit to capturing 'this'. So, might as well drop it & end up with fewer build warnings.
I think all of these lambdas come from bug 1297552 - adding dependency on that bug.
Depends on: 1297552
Comment on attachment 8844100 [details] Bug 1344816: Remove unused 'this' variable lambda-captures from U2F.cpp. https://reviewboard.mozilla.org/r/117634/#review119328 LGTM, it was indeed left in there after an in-bug refactor. Thanks!
Attachment #8844100 - Flags: review?(jjones) → review+
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6e696aeb1bbf Remove unused 'this' variable lambda-captures from U2F.cpp. r=jcj
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: