[webkit-reviews] review granted: [Bug 80790] Fix some compiler warnings (miscellaneous) : [Attachment 131488] WebCore part of signed/unsigned mismatch warnings, improved
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 12 22:54:27 PDT 2012
Alexey Proskuryakov <ap at webkit.org> has granted George Staikos
<staikos at kde.org>'s request for review:
Bug 80790: Fix some compiler warnings (miscellaneous)
https://bugs.webkit.org/show_bug.cgi?id=80790
Attachment 131488: WebCore part of signed/unsigned mismatch warnings, improved
https://bugs.webkit.org/attachment.cgi?id=131488&action=review
------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=131488&action=review
r=me assuming you verify that the comparison in IconDatabase is not bogus.
> Source/WebCore/loader/icon/IconDatabase.cpp:655
> - return (int)currentTime() - icon->getTimestamp() >
iconExpirationTime ? IconLoadYes : IconLoadNo;
> + return static_cast<int>(currentTime()) -
static_cast<int>(icon->getTimestamp()) > iconExpirationTime ? IconLoadYes :
IconLoadNo;
Can we cast the other way to avoid trouble in 2038, and for general sanity?
currentTime() returns a double.
Actually, this looks slightly suspicious - do we know that these use the same
epoch on all platforms?
More information about the webkit-reviews
mailing list