Bug 172084 - Unused lambda capture in JSContextGroupAddMarkingConstraint()
Summary: Unused lambda capture in JSContextGroupAddMarkingConstraint()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-13 21:46 PDT by David Kilzer (:ddkilzer)
Modified: 2017-05-13 22:37 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.20 KB, patch)
2017-05-13 21:46 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2017-05-13 21:46:21 PDT
<https://webkit.org/b/000000>

Reviewed by NOBODY (OOPS!).

Fixes the following warning with newer clang:

Source/JavaScriptCore/API/JSMarkingConstraintPrivate.cpp:78:11: error: lambda capture 'vm' is not used [-Werror,-Wunused-lambda-capture]
[&vm, constraintCallback, userData]
^

* API/JSMarkingConstraintPrivate.cpp:
(JSContextGroupAddMarkingConstraint): Remove unused lambda
capture for '&vm'.
---
 2 files changed, 18 insertions(+), 4 deletions(-)
Comment 1 David Kilzer (:ddkilzer) 2017-05-13 21:46:23 PDT
Created attachment 310060 [details]
Patch
Comment 2 David Kilzer (:ddkilzer) 2017-05-13 21:48:47 PDT
Comment on attachment 310060 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310060&action=review

> Source/JavaScriptCore/API/JSMarkingConstraintPrivate.cpp:78
> -        [&vm, constraintCallback, userData]
> +        [constraintCallback, userData]

I'm not sure whether this is some magic to make GC work, so if the &vm lambda needs to stay, we can use UNUSED_PARAM(&vm) in the body to silence the warning.
Comment 3 Saam Barati 2017-05-13 22:08:18 PDT
Comment on attachment 310060 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=310060&action=review

>> Source/JavaScriptCore/API/JSMarkingConstraintPrivate.cpp:78
>> +        [constraintCallback, userData]
> 
> I'm not sure whether this is some magic to make GC work, so if the &vm lambda needs to stay, we can use UNUSED_PARAM(&vm) in the body to silence the warning.

Doesn't seem like it to me.
Comment 4 WebKit Commit Bot 2017-05-13 22:37:56 PDT
Comment on attachment 310060 [details]
Patch

Clearing flags on attachment: 310060

Committed r216837: <http://trac.webkit.org/changeset/216837>
Comment 5 WebKit Commit Bot 2017-05-13 22:37:57 PDT
All reviewed patches have been landed.  Closing bug.