Title: [236749] trunk/Source/WebKit
Revision
236749
Author
mcatanz...@igalia.com
Date
2018-10-02 10:32:01 -0700 (Tue, 02 Oct 2018)

Log Message

REGRESSION(r236662): Fix -Wformat warnings in CacheStorageEngineCaches.cpp
https://bugs.webkit.org/show_bug.cgi?id=190205

Reviewed by Chris Dumez.

Passing enums to %d is not kosher, at least not according to GCC's -Wformat. Avoid it.

* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::initialize):
(WebKit::CacheStorage::Caches::readCachesFromDisk):
(WebKit::CacheStorage::Caches::writeCachesToDisk):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (236748 => 236749)


--- trunk/Source/WebKit/ChangeLog	2018-10-02 17:08:44 UTC (rev 236748)
+++ trunk/Source/WebKit/ChangeLog	2018-10-02 17:32:01 UTC (rev 236749)
@@ -1,3 +1,17 @@
+2018-10-02  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        REGRESSION(r236662): Fix -Wformat warnings in CacheStorageEngineCaches.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=190205
+
+        Reviewed by Chris Dumez.
+
+        Passing enums to %d is not kosher, at least not according to GCC's -Wformat. Avoid it.
+
+        * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
+        (WebKit::CacheStorage::Caches::initialize):
+        (WebKit::CacheStorage::Caches::readCachesFromDisk):
+        (WebKit::CacheStorage::Caches::writeCachesToDisk):
+
 2018-10-02  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r236624 and r236671.

Modified: trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp (236748 => 236749)


--- trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp	2018-10-02 17:08:44 UTC (rev 236748)
+++ trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp	2018-10-02 17:32:01 UTC (rev 236749)
@@ -153,7 +153,7 @@
 
     storeOrigin([this] (std::optional<Error>&& error) mutable {
         if (error) {
-            RELEASE_LOG_ERROR(CacheStorage, "Caches::initialize failed storing origin with error %d", *error);
+            RELEASE_LOG_ERROR(CacheStorage, "Caches::initialize failed storing origin with error %d", static_cast<int>(*error));
 
             auto pendingCallbacks = WTFMove(m_pendingInitializationCallbacks);
             for (auto& callback : pendingCallbacks)
@@ -167,7 +167,7 @@
             makeDirty();
 
             if (!result.has_value()) {
-                RELEASE_LOG_ERROR(CacheStorage, "Caches::initialize failed reading caches from disk with error %d", result.error());
+                RELEASE_LOG_ERROR(CacheStorage, "Caches::initialize failed reading caches from disk with error %d", static_cast<int>(result.error()));
 
                 auto pendingCallbacks = WTFMove(m_pendingInitializationCallbacks);
                 for (auto& callback : pendingCallbacks)
@@ -427,7 +427,7 @@
 
         auto result = decodeCachesNames(data);
         if (!result.has_value()) {
-            RELEASE_LOG_ERROR(CacheStorage, "Caches::decodeCachesNames failed decoding caches with error %d", result.error());
+            RELEASE_LOG_ERROR(CacheStorage, "Caches::decodeCachesNames failed decoding caches with error %d", static_cast<int>(result.error()));
             callback(makeUnexpected(result.error()));
             return;
         }
@@ -458,7 +458,7 @@
     m_engine->writeFile(cachesListFilename(m_rootPath), encodeCacheNames(m_caches), [this, protectedThis = makeRef(*this), callback = WTFMove(callback)](std::optional<Error>&& error) mutable {
         m_isWritingCachesToDisk = false;
         if (error)
-            RELEASE_LOG_ERROR(CacheStorage, "Caches::writeCachesToDisk failed writing caches to disk with error %d", *error);
+            RELEASE_LOG_ERROR(CacheStorage, "Caches::writeCachesToDisk failed writing caches to disk with error %d", static_cast<int>(*error));
 
         callback(WTFMove(error));
         while (!m_pendingWritingCachesToDiskCallbacks.isEmpty() && !m_isWritingCachesToDisk)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to