RESOLVED FIXED69080
[WEBKIT2] Fix for compilation warnings in WebContext.cpp
https://bugs.webkit.org/show_bug.cgi?id=69080
Summary [WEBKIT2] Fix for compilation warnings in WebContext.cpp
Goutham J
Reported 2011-09-29 03:56:16 PDT
We get following compilation warnings while building WebContext.cpp, CC Source/WebKit2/UIProcess/API/gtk/tests/Programs_unittests_webkit2_testloading-testloading.o CC Tools/GtkLauncher/Programs_GtkLauncher2-main.o /bin/mkdir -p ./.deps/DerivedSources ../../Source/WebKit2/UIProcess/WebContext.cpp: In member function ‘void WebKit::WebContext::processDidFinishLaunching(WebKit::WebProcessProxy*)’: ../../Source/WebKit2/UIProcess/WebContext.cpp:325:95: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ ../../Source/WebKit2/UIProcess/WebContext.cpp: In member function ‘void WebKit::WebContext::startMemorySampler(double)’: ../../Source/WebKit2/UIProcess/WebContext.cpp:741:91: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ This is because, format-specifier llu expects 'unsigned long long int', whereas in Linux uint64_t is 'unsigned long int'. Type-casting to 'unsigned long long int' instead of 'uint64_t' should work in all platforms.
Attachments
Warning fix (2.26 KB, patch)
2011-09-29 03:57 PDT, Goutham J
darin: review+
Warning fix (2.31 KB, patch)
2011-10-19 11:32 PDT, Goutham J
no flags
Goutham J
Comment 1 2011-09-29 03:57:50 PDT
Created attachment 109146 [details] Warning fix
Darin Adler
Comment 2 2011-10-17 13:03:15 PDT
Comment on attachment 109146 [details] Warning fix View in context: https://bugs.webkit.org/attachment.cgi?id=109146&action=review > Source/WebKit2/UIProcess/WebContext.cpp:325 > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<unsigned long long int>(now)); No reason to include the word “int”. > Source/WebKit2/UIProcess/WebContext.cpp:741 > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<unsigned long long int>(now)); No reason to include the word “int”.
Goutham J
Comment 3 2011-10-19 11:32:42 PDT
Created attachment 111652 [details] Warning fix
Hajime Morrita
Comment 4 2011-12-01 22:37:52 PST
Comment on attachment 111652 [details] Warning fix Looks ultra-trivial and addressed Darin's point. r+ing.
WebKit Review Bot
Comment 5 2011-12-01 23:02:08 PST
Comment on attachment 111652 [details] Warning fix Clearing flags on attachment: 111652 Committed r101746: <http://trac.webkit.org/changeset/101746>
WebKit Review Bot
Comment 6 2011-12-01 23:02:12 PST
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.