Fix -Wunused-lambda-capture warnings in WebKit with new clang compiler
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2017 23:59:35 +0000 (23:59 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2017 23:59:35 +0000 (23:59 +0000)
<https://webkit.org/b/175911>
<rdar://problem/33667497>

Reviewed by Alex Christensen.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::retrieveCaches): Remove unused
lambda capture for 'this'.
(WebKit::CacheStorage::Engine::putRecords): Remove unused
lambda capture for 'cacheIdentifier'.
* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
(WebKit::CacheStorageEngineConnection::records): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221215 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.cpp

index 928cce1..a741559 100644 (file)
@@ -1,3 +1,19 @@
+2017-08-25  David Kilzer  <ddkilzer@apple.com>
+
+        Fix -Wunused-lambda-capture warnings in WebKit with new clang compiler
+        <https://webkit.org/b/175911>
+        <rdar://problem/33667497>
+
+        Reviewed by Alex Christensen.
+
+        * NetworkProcess/cache/CacheStorageEngine.cpp:
+        (WebKit::CacheStorage::Engine::retrieveCaches): Remove unused
+        lambda capture for 'this'.
+        (WebKit::CacheStorage::Engine::putRecords): Remove unused
+        lambda capture for 'cacheIdentifier'.
+        * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
+        (WebKit::CacheStorageEngineConnection::records): Ditto.
+
 2017-08-25  Brian Burg  <bburg@apple.com>
 
         Web Automation: add capabilities to control ICE candidate filtering and insecure media capture
index 5aebbe6..93ca819 100644 (file)
@@ -120,7 +120,7 @@ void Engine::remove(uint64_t cacheIdentifier, CacheIdentifierCallback&& callback
 
 void Engine::retrieveCaches(const String& origin, CacheInfosCallback&& callback)
 {
-    readCachesFromDisk(origin, [this, callback = WTFMove(callback)](CachesOrError&& cachesOrError) mutable {
+    readCachesFromDisk(origin, [callback = WTFMove(callback)](CachesOrError&& cachesOrError) mutable {
         if (!cachesOrError.hasValue()) {
             callback(makeUnexpected(cachesOrError.error()));
             return;
@@ -189,7 +189,7 @@ void Engine::putRecords(uint64_t cacheIdentifier, Vector<Record>&& records, Reco
                 }
             }
         }
-        writeCacheRecords(cacheIdentifier, WTFMove(recordIdentifiers), [cacheIdentifier, callback = WTFMove(callback)](RecordIdentifiersOrError&& result) mutable {
+        writeCacheRecords(cacheIdentifier, WTFMove(recordIdentifiers), [callback = WTFMove(callback)](RecordIdentifiersOrError&& result) mutable {
             callback(WTFMove(result));
         });
     });
index 35eb1d6..bf49938 100644 (file)
@@ -65,7 +65,7 @@ void CacheStorageEngineConnection::caches(PAL::SessionID sessionID, uint64_t req
 
 void CacheStorageEngineConnection::records(PAL::SessionID sessionID, uint64_t requestIdentifier, uint64_t cacheIdentifier)
 {
-    Engine::from(sessionID).retrieveRecords(cacheIdentifier, [protectedThis = makeRef(*this), this, sessionID, cacheIdentifier, requestIdentifier](RecordsOrError&& result) {
+    Engine::from(sessionID).retrieveRecords(cacheIdentifier, [protectedThis = makeRef(*this), this, sessionID, requestIdentifier](RecordsOrError&& result) {
         m_connection.connection().send(Messages::WebCacheStorageConnection::UpdateRecords(requestIdentifier, result), sessionID.sessionID());
     });
 }