WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
33952
build failure on RVCT
https://bugs.webkit.org/show_bug.cgi?id=33952
Summary
build failure on RVCT
Joe Mason
Reported
2010-01-21 07:46:05 PST
RVCT 4.0 fails to compile in FEComponentTransfer.cpp - "ambiguous overload in function pow" (provided args are (int,float), possible overloads include (int,int), (float,float) and (double,double). This patch casts the args to double to match the return value.
Attachments
build fix
(1.46 KB, patch)
2010-01-21 08:09 PST
,
Joe Mason
darin
: review+
Details
Formatted Diff
Diff
updated patch
(1.91 KB, patch)
2010-01-21 11:55 PST
,
Joe Mason
no flags
Details
Formatted Diff
Diff
style fix
(1.91 KB, patch)
2010-01-21 12:12 PST
,
Joe Mason
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Joe Mason
Comment 1
2010-01-21 08:09:52 PST
Created
attachment 47118
[details]
build fix
Darin Adler
Comment 2
2010-01-21 11:40:29 PST
Comment on
attachment 47118
[details]
build fix I'm unclear on what's ambiguous here and why RVCT is complaining. Where's the ambiguity? In C++, the expression i / 255.0 is unambiguously a double, so I can't see how adding a cast to that expression is helpful. Further, pow(double, int) also does not seem ambiguous.
> - double val = 255.0 * (transferFunction.amplitude * pow((i / 255.0), transferFunction.exponent) + transferFunction.offset); > + double val = 255.0 * (transferFunction.amplitude * pow((static_cast<double>(i) / 255.0), static_cast<double>(transferFunction.exponent)) + transferFunction.offset);
The change is OK. It's better to keep casts to a minimum if possible, so an approach that used local variables instead might be cleaner. I'm going to say review+ because there's not a lot of downside here, but I think this is probably not a great change given a lack of understanding of what's ambiguous combined with the relatively ugly solution.
Darin Adler
Comment 3
2010-01-21 11:41:40 PST
I really don't see anything passing int, float here. Maybe double, float. Seems like yet another RVCT compiler bug. Is there any better way to support this flawed compiler?
Joe Mason
Comment 4
2010-01-21 11:46:03 PST
You're right, it's double,float, so only the second cast is needed. I'll update the patch.
Joe Mason
Comment 5
2010-01-21 11:55:17 PST
Created
attachment 47134
[details]
updated patch
WebKit Review Bot
Comment 6
2010-01-21 12:02:38 PST
Attachment 47134
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/graphics/filters/FEComponentTransfer.cpp:144: One space before end of line comments [whitespace/comments] [5] Total errors found: 1 If any of these errors are false positives, please file a bug against check-webkit-style.
Joe Mason
Comment 7
2010-01-21 12:12:20 PST
Created
attachment 47136
[details]
style fix Grr. Knew I forgot something.
Darin Adler
Comment 8
2010-01-21 14:11:59 PST
Comment on
attachment 47136
[details]
style fix
> + Copyright (C) Research In Motion Limited 2010. All rights reserved.
I think there is a guideline about how big a chance is sufficient to assert copyright. This is probably small enough that it's not sufficient. Change looks great. r=me
WebKit Commit Bot
Comment 9
2010-01-21 21:23:18 PST
Comment on
attachment 47136
[details]
style fix Clearing flags on attachment: 47136 Committed
r53674
: <
http://trac.webkit.org/changeset/53674
>
WebKit Commit Bot
Comment 10
2010-01-21 21:23:23 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.
Top of Page
Format For Printing
XML
Clone This Bug