RESOLVED FIXED 95550
Build warning : -Wformat on WebMemorySampler.cpp.
https://bugs.webkit.org/show_bug.cgi?id=95550
Summary Build warning : -Wformat on WebMemorySampler.cpp.
Byungwoo Lee
Reported 2012-08-31 03:59:38 PDT
Fix build warning -Wformat on WebMemorySampler.cpp by adding explicit casting.
Attachments
Patch (1.53 KB, patch)
2012-08-31 04:05 PDT, Byungwoo Lee
no flags
Patch (1.53 KB, patch)
2012-08-31 17:52 PDT, Byungwoo Lee
no flags
Patch (1.53 KB, patch)
2012-08-31 18:10 PDT, Byungwoo Lee
no flags
Patch (1.52 KB, patch)
2012-08-31 19:50 PDT, Byungwoo Lee
no flags
Byungwoo Lee
Comment 1 2012-08-31 04:05:16 PDT
Gyuyoung Kim
Comment 2 2012-08-31 06:06:52 PDT
Comment on attachment 161658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161658&action=review > Source/WebKit2/Shared/WebMemorySampler.cpp:178 > + statString.append(String::format("%lu", static_cast<long unsigned int>(memoryStats.values[i]))); Is it enough *unsigned long* ?
Darin Adler
Comment 3 2012-08-31 12:04:21 PDT
Comment on attachment 161658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161658&action=review A better fix would probably be to use String::number instead of String::format. >> Source/WebKit2/Shared/WebMemorySampler.cpp:178 >> + statString.append(String::format("%lu", static_cast<long unsigned int>(memoryStats.values[i]))); > > Is it enough *unsigned long* ? That’s right. In our code we use the name “unsigned long” for this type, not “long unsigned int”, which is equivalent, but not idiomatic. When landing this please use “unsigned long” rather than “long unsigned int”.
Byungwoo Lee
Comment 4 2012-08-31 17:52:58 PDT
Byungwoo Lee
Comment 5 2012-08-31 17:54:07 PDT
Ok I applied that. Thanks for all your comments :)
Byungwoo Lee
Comment 6 2012-08-31 18:10:50 PDT
Gyuyoung Kim
Comment 7 2012-08-31 19:10:41 PDT
Comment on attachment 161805 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161805&action=review > Source/WebKit2/Shared/WebMemorySampler.cpp:178 > + statString.append(String::format("%lu", static_cast<unsigned long>(memoryStats.values[i]))); As Darin said, please use String::number instead of String::format.
Byungwoo Lee
Comment 8 2012-08-31 19:35:20 PDT
(In reply to comment #7) > (From update of attachment 161805 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161805&action=review > > > Source/WebKit2/Shared/WebMemorySampler.cpp:178 > > + statString.append(String::format("%lu", static_cast<unsigned long>(memoryStats.values[i]))); > > As Darin said, please use String::number instead of String::format. Sorry for my carelessness. I didn't read the upper part about String::number. I'll apply those and upload again. Thanks :)
Byungwoo Lee
Comment 9 2012-08-31 19:50:01 PDT
WebKit Review Bot
Comment 10 2012-08-31 20:45:36 PDT
Comment on attachment 161811 [details] Patch Clearing flags on attachment: 161811 Committed r127353: <http://trac.webkit.org/changeset/127353>
WebKit Review Bot
Comment 11 2012-08-31 20:45:40 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.