WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
149867
Format string issues in NetworkCache.cpp
https://bugs.webkit.org/show_bug.cgi?id=149867
Summary
Format string issues in NetworkCache.cpp
Michael Catanzaro
Reported
2015-10-06 20:17:22 PDT
[1045/1606] Building CXX object Source...etworkProcess/cache/NetworkCache.cpp.o In file included from ../../Source/WTF/wtf/StdLibExtras.h:32:0, from ../../Source/WTF/wtf/FastMalloc.h:26, from ../../Source/WebKit2/config.h:44, from ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:26: ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp: In member function ‘void WebKit::NetworkCache::Cache::retrieve(const WebCore::ResourceRequest&, uint64_t, std::function<void(std::unique_ptr<WebKit::NetworkCache::Entry>)>)’: ../../Source/WTF/wtf/Assertions.h:349:105: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘WebCore::ResourceLoadPriority’ [-Wformat=] #define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) ^ ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:337:5: note: in expansion of macro ‘LOG’ LOG(NetworkCache, "(NetworkProcess) retrieving %s priority %u", originalRequest.url().string().ascii().data(), originalRequest.priority()); ^ ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp: In lambda function: ../../Source/WTF/wtf/Assertions.h:349:105: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘WebKit::NetworkCache::UseDecision’ [-Wformat=] #define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) ^ ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:383:9: note: in expansion of macro ‘LOG’ LOG(NetworkCache, "(NetworkProcess) retrieve complete useDecision=%d priority=%u time=%" PRIi64 "ms", useDecision, originalRequest.priority(), elapsedMS); ^ ../../Source/WTF/wtf/Assertions.h:349:105: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘WebCore::ResourceLoadPriority’ [-Wformat=] #define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) ^ ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:383:9: note: in expansion of macro ‘LOG’ LOG(NetworkCache, "(NetworkProcess) retrieve complete useDecision=%d priority=%u time=%" PRIi64 "ms", useDecision, originalRequest.priority(), elapsedMS); ^ ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp: In member function ‘void WebKit::NetworkCache::Cache::store(const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WTF::RefPtr<WebCore::SharedBuffer>&&, std::function<void(WebKit::NetworkCache::MappedBody&)>)’: ../../Source/WTF/wtf/Assertions.h:349:105: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘WebKit::NetworkCache::StoreDecision’ [-Wformat=] #define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) ^ ../../Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:409:9: note: in expansion of macro ‘LOG’ LOG(NetworkCache, "(NetworkProcess) didn't store, storeDecision=%d", storeDecision); ^
Attachments
Patch
(2.96 KB, patch)
2015-10-06 21:29 PDT
,
Michael Catanzaro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2015-10-06 21:29:41 PDT
Created
attachment 262578
[details]
Patch
WebKit Commit Bot
Comment 2
2015-10-08 08:30:19 PDT
Comment on
attachment 262578
[details]
Patch Clearing flags on attachment: 262578 Committed
r190726
: <
http://trac.webkit.org/changeset/190726
>
WebKit Commit Bot
Comment 3
2015-10-08 08:30:22 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug