RESOLVED FIXED 171028
-Wformat warning on HistoryController.cpp:295:5
https://bugs.webkit.org/show_bug.cgi?id=171028
Summary -Wformat warning on HistoryController.cpp:295:5
Michael Catanzaro
Reported 2017-04-19 18:49:55 PDT
Cannot use enum as int without a cast: [881/3415] Building CXX object Source/...ore.dir/loader/HistoryController.cpp.o In file included from ../../Source/WTF/wtf/StdLibExtras.h:34:0, from ../../Source/WTF/wtf/FastMalloc.h:26, from ../../Source/WebCore/config.h:75, from ../../Source/WebCore/loader/HistoryController.cpp:31: ../../Source/WebCore/loader/HistoryController.cpp: In member function ‘void WebCore::HistoryController::goToItem(WebCore::HistoryItem&, WebCore::FrameLoadType)’: ../../Source/WTF/wtf/Assertions.h:407:68: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘WebCore::FrameLoadType’ [-Wformat=] #define LOG(channel, ...) WTFLog(&LOG_CHANNEL(channel), __VA_ARGS__) ^ ../../Source/WebCore/loader/HistoryController.cpp:295:5: note: in expansion of macro ‘LOG’ LOG(History, "HistoryController %p goToItem %p type=%d", this, &targetItem, type); ^~~
Attachments
Patch (1.43 KB, patch)
2017-04-19 18:51 PDT, Michael Catanzaro
dbates: review+
dbates: commit-queue-
Michael Catanzaro
Comment 1 2017-04-19 18:51:04 PDT
Daniel Bates
Comment 2 2017-04-19 21:33:50 PDT
Comment on attachment 307539 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=307539&action=review I am assuming that -Wall does not include -Wformat and that we do not enable -Wformat on the Mac, iOS, or Windows bots as I have not seen this failure. We should look to enable -Wformat on these bots. > Source/WebCore/ChangeLog:7 > + Please explain the change.
Michael Catanzaro
Comment 3 2017-04-20 09:46:57 PDT
(In reply to Daniel Bates from comment #2) > Comment on attachment 307539 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=307539&action=review > > I am assuming that -Wall does not include -Wformat No, -Wall does include -Wformat (at least in GCC). > and that we do not enable > -Wformat on the Mac, iOS, or Windows bots as I have not seen this failure. > We should look to enable -Wformat on these bots. I don't know about that. Certainly the Apple builds seem to be less-strict about such issues. > > Source/WebCore/ChangeLog:7 > > + > > Please explain the change. Aw man. :P
Michael Catanzaro
Comment 4 2017-04-20 14:57:03 PDT
Note You need to log in before you can comment on or make changes to this bug.