Bug 315305
| Summary: | Unreviewed, Windows build fix for unused lambda capture in WebLocalFrameLoaderClient::didCacheBackForwardItem | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Basuke Suzuki <basuke> |
| Component: | New Bugs | Assignee: | Basuke Suzuki <basuke> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Basuke Suzuki
After https://commits.webkit.org/313625@main (b776e22550fb), the Windows build fails with:
UnifiedSource-WebProcess-25.cpp:
WebLocalFrameLoaderClient.cpp(1749,91): error: lambda capture 'itemID' is not used [-Werror,-Wunused-lambda-capture]
webPage->sendWithAsyncReply(Messages::WebPageProxy::DidCacheBackForwardItem(itemID), [itemID, frameItemID](bool success) {
^~~~~~~
The lambda only references itemID inside RELEASE_LOG_ERROR, which expands to no-op on Windows, so the capture appears unused under -Wunused-lambda-capture.
Fix: add UNUSED_PARAM(itemID) at the start of the lambda body to keep the log information for ports where RELEASE_LOG_ERROR is active and silence the warning where it is not.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Basuke Suzuki
*** This bug has been marked as a duplicate of bug 315299 ***