Bug 149866

Summary: Format string issues in LegacyRequest.cpp
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebCore Misc.Assignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Minor CC: alecflett, beidson, commit-queue, jsbell, mcatanzaro, ossy
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2015-10-06 19:38:40 PDT
Probably need to static_cast<int>(m_readyState)

[1669/5846] Building CXX object Source...s/indexeddb/legacy/LegacyRequest.cpp.o
In file included from ../../Source/WTF/wtf/StdLibExtras.h:32:0,
                 from ../../Source/WTF/wtf/FastMalloc.h:26,
                 from ../../Source/WebCore/config.h:75,
                 from ../../Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp:29:
../../Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp: In member function ‘virtual bool WebCore::LegacyRequest::dispatchEvent(WTF::PassRefPtr<WebCore::Event>)’:
../../Source/WTF/wtf/Assertions.h:278:110: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘WebCore::IDBRequestReadyState’ [-Wformat=]
         WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \
                                                                                                              ^
../../Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp:478:5: note: in expansion of macro ‘ASSERT_WITH_MESSAGE’
     ASSERT_WITH_MESSAGE(m_readyState < IDBRequestReadyState::Done, "When dispatching event %s, m_readyState < DONE(%d), was %d", event->type().string().utf8().data(), IDBRequestReadyState::Done, m_readyState);
     ^
../../Source/WTF/wtf/Assertions.h:278:110: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘WebCore::IDBRequestReadyState’ [-Wformat=]
         WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \
                                                                                                              ^
../../Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp:478:5: note: in expansion of macro ‘ASSERT_WITH_MESSAGE’
     ASSERT_WITH_MESSAGE(m_readyState < IDBRequestReadyState::Done, "When dispatching event %s, m_readyState < DONE(%d), was %d", event->type().string().utf8().data(), IDBRequestReadyState::Done, m_readyState);
     ^
../../Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp: In member function ‘void WebCore::LegacyRequest::enqueueEvent(WTF::PassRefPtr<WebCore::Event>)’:
../../Source/WTF/wtf/Assertions.h:278:110: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘WebCore::IDBRequestReadyState’ [-Wformat=]
         WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \
                                                                                                              ^
../../Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp:575:5: note: in expansion of macro ‘ASSERT_WITH_MESSAGE’
     ASSERT_WITH_MESSAGE(m_readyState == IDBRequestReadyState::Pending || m_didFireUpgradeNeededEvent, "When queueing event %s, m_readyState was %d", event->type().string().utf8().data(), m_readyState);
     ^
Comment 1 Michael Catanzaro 2015-10-06 21:19:25 PDT
Created attachment 262576 [details]
Patch
Comment 2 WebKit Commit Bot 2015-10-08 08:28:24 PDT
Comment on attachment 262576 [details]
Patch

Clearing flags on attachment: 262576

Committed r190725: <http://trac.webkit.org/changeset/190725>
Comment 3 WebKit Commit Bot 2015-10-08 08:28:28 PDT
All reviewed patches have been landed.  Closing bug.