WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56865
Webkit warning: converting to 'unsigned int' from 'double'
https://bugs.webkit.org/show_bug.cgi?id=56865
Summary
Webkit warning: converting to 'unsigned int' from 'double'
George Guo
Reported
2011-03-22 14:53:13 PDT
When I tried to compile webkit on RedHat Linux with this following command: Tools/Scripts/build-webkit --qt –debug I got the following error ../../Source/JavaScriptCore/profiler -I../../../Source/JavaScriptCore/runtime -I../../../Source/JavaScriptCore/wtf -I../../../Source/JavaScriptCore/wtf/gobject -I/nokia/bs_nmp/groups/s40_builds/naguo/webkit2/trunk/Source/JavaScriptCore/wtf/symbian -I../../../Source/JavaScriptCore/wtf/unicode -I../../../Source/JavaScriptCore/yarr -I../../../Source/JavaScriptCore/API -I../../../Source/JavaScriptCore/ForwardingHeaders -Igenerated -I../../../Source -I../include/QtWebKit -I../include -I. -I../../../Source/JavaScriptCore -I. -o obj/debug/TimeoutChecker.o ../../../Source/JavaScriptCore/runtime/TimeoutChecker.cpp cc1plus: warnings being treated as errors ../../../Source/JavaScriptCore/runtime/TimeoutChecker.cpp: In function 'unsigned int JSC::getCPUTime()': ../../../Source/JavaScriptCore/runtime/TimeoutChecker.cpp:104: warning: converting to 'unsigned int' from 'double' make[1]: *** [obj/debug/TimeoutChecker.o] Error 1
Attachments
A explicit cast in C++ style for review
(1.19 KB, patch)
2011-03-22 17:44 PDT
,
George Guo
darin
: review-
Details
Formatted Diff
Diff
This patch resolves the issue pointed out by Adler during the review
(1.20 KB, patch)
2011-03-23 06:55 PDT
,
George Guo
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Laszlo Gombos
Comment 1
2011-03-22 15:27:41 PDT
This is not just for Qt, removing the Qt prefix.
George Guo
Comment 2
2011-03-22 17:44:12 PDT
Created
attachment 86553
[details]
A explicit cast in C++ style for review
Darin Adler
Comment 3
2011-03-22 18:33:18 PDT
Comment on
attachment 86553
[details]
A explicit cast in C++ style for review This casts to unsigned before multiplying by 1000, so now the function will only return multiples of 1000!
George Guo
Comment 4
2011-03-23 06:55:32 PDT
Created
attachment 86611
[details]
This patch resolves the issue pointed out by Adler during the review
Darin Adler
Comment 5
2011-03-23 09:00:05 PDT
Comment on
attachment 86611
[details]
This patch resolves the issue pointed out by Adler during the review View in context:
https://bugs.webkit.org/attachment.cgi?id=86611&action=review
> Source/JavaScriptCore/runtime/TimeoutChecker.cpp:104 > + return static_cast<unsigned> ((currentTime() - firstTime) * 1000);
There’s an extra space here after the "<". This is not the normal way we format. I’m also concerned. We have many places where we assign from double to an integer. Is this really the only failure in WebKit of this type?
George Guo
Comment 6
2011-03-23 11:06:04 PDT
ok, preparing a new patch to get rid of the extra space. Yes, with the build it did pass the build after this change.
WebKit Commit Bot
Comment 7
2011-03-23 14:05:29 PDT
Comment on
attachment 86611
[details]
This patch resolves the issue pointed out by Adler during the review Clearing flags on attachment: 86611 Committed
r81803
: <
http://trac.webkit.org/changeset/81803
>
WebKit Commit Bot
Comment 8
2011-03-23 14:05:34 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