WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
65025
Eliminate WebKit2 compilation warnings.
https://bugs.webkit.org/show_bug.cgi?id=65025
Summary
Eliminate WebKit2 compilation warnings.
Lukasz Slachciak
Reported
2011-07-22 05:50:04 PDT
Eliminate compilator warnings for WebKit2 related to wrong type comparison.
Attachments
Compilator warnings patch
(2.26 KB, patch)
2011-07-22 06:39 PDT
,
Lukasz Slachciak
darin
: review+
Details
Formatted Diff
Diff
more compiler warnings fix
(3.66 KB, patch)
2011-09-13 05:56 PDT
,
Wajahat Siddiqui
no flags
Details
Formatted Diff
Diff
compiler warnings fix updated
(2.09 KB, patch)
2011-09-14 07:06 PDT
,
Wajahat Siddiqui
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Lukasz Slachciak
Comment 1
2011-07-22 06:39:57 PDT
Created
attachment 101724
[details]
Compilator warnings patch
Raphael Kubo da Costa (:rakuco)
Comment 2
2011-07-25 09:03:07 PDT
Looks OK to me.
Alexis Menard (darktears)
Comment 3
2011-08-01 11:36:15 PDT
Comment on
attachment 101724
[details]
Compilator warnings patch View in context:
https://bugs.webkit.org/attachment.cgi?id=101724&action=review
LGTM.
> Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1268 > + if (wmodeIndex == notFound) {
I guess it is using the WTF::NotFound.
Wajahat Siddiqui
Comment 4
2011-09-13 05:56:57 PDT
Created
attachment 107168
[details]
more compiler warnings fix Addressing
Comment#3
its WTF::notFound, also fixing some more warnings on webkit2
Darin Adler
Comment 5
2011-09-13 09:49:12 PDT
Comment on
attachment 107168
[details]
more compiler warnings fix View in context:
https://bugs.webkit.org/attachment.cgi?id=107168&action=review
> Source/WebKit2/UIProcess/WebContext.cpp:324 > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<long long unsigned int>(now));
The name we use for this type in WebKit is "unsigned long long" rather than "long long unsigned int". Anders may have additional comments. I know he often uses uint64_t intentionally so we might instead want to use the string that lets us format a uint64_t instead of changing the typecast.
> Source/WebKit2/UIProcess/WebContext.cpp:733 > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<long long unsigned int>(now));
Ditto.
> Source/WebKit2/ChangeLog:3 > + Eliminate WebKit2 compilation warnings.
It would be better if this said what compiler and platform these warnings were found with.
Darin Adler
Comment 6
2011-09-13 09:49:41 PDT
Comment on
attachment 107168
[details]
more compiler warnings fix View in context:
https://bugs.webkit.org/attachment.cgi?id=107168&action=review
> Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1269 > + if (wmodeIndex == WTF::notFound) {
We normally just call this notFound. I am surprised that the explicit WTF:: is needed, and if it’s not needed, please omit it.
Darin Adler
Comment 7
2011-09-13 09:50:00 PDT
We normally want a separate bug for each patch. Putting two patches in a single bug is not good.
Anders Carlsson
Comment 8
2011-09-13 10:00:22 PDT
(In reply to
comment #5
)
> (From update of
attachment 107168
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=107168&action=review
> > > Source/WebKit2/UIProcess/WebContext.cpp:324 > > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<long long unsigned int>(now)); > > The name we use for this type in WebKit is "unsigned long long" rather than "long long unsigned int". Anders may have additional comments. I know he often uses uint64_t intentionally so we might instead want to use the string that lets us format a uint64_t instead of changing the typecast.
We only use explicitly sized types when dealing with CoreIPC messages; you want to avoid sending an unsigned long between a 64-bit and a 32-bit process.
Darin Adler
Comment 9
2011-09-13 10:26:07 PDT
(In reply to
comment #8
)
> (In reply to
comment #5
) > > (From update of
attachment 107168
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=107168&action=review
> > > > > Source/WebKit2/UIProcess/WebContext.cpp:324 > > > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<long long unsigned int>(now)); > > > > The name we use for this type in WebKit is "unsigned long long" rather than "long long unsigned int". Anders may have additional comments. I know he often uses uint64_t intentionally so we might instead want to use the string that lets us format a uint64_t instead of changing the typecast. > > We only use explicitly sized types when dealing with CoreIPC messages; you want to avoid sending an unsigned long between a 64-bit and a 32-bit process.
Sure, but this is about interoperating with printf format strings. The two ways to do that are to use the macros for creating the format strings, or casting to a built-in language type such as "unsigned long long". Do you have a comment on which is preferred? Maybe the right fix is to use a format string more like "%.0f" instead of trying to cast to an integral type?
Anders Carlsson
Comment 10
2011-09-13 10:31:05 PDT
(In reply to
comment #9
)
> Sure, but this is about interoperating with printf format strings. The two ways to do that are to use the macros for creating the format strings, or casting to a built-in language type such as "unsigned long long". Do you have a comment on which is preferred? Maybe the right fix is to use a format string more like "%.0f" instead of trying to cast to an integral type?
I don't have a strong opinion. In this particular case I think a full date + time string would be better, but that might be outside the scope of this patch.
Wajahat Siddiqui
Comment 11
2011-09-14 07:06:31 PDT
Created
attachment 107329
[details]
compiler warnings fix updated updated based on review
Wajahat Siddiqui
Comment 12
2011-09-14 07:12:20 PDT
(In reply to
comment #5
) Thanks for the review !!
> (From update of
attachment 107168
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=107168&action=review
> > > Source/WebKit2/UIProcess/WebContext.cpp:324 > > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<long long unsigned int>(now)); > > The name we use for this type in WebKit is "unsigned long long" rather than "long long unsigned int". Anders may have additional comments. I know he often uses uint64_t intentionally so we might instead want to use the string that lets us format a uint64_t instead of changing the typecast.
Based on below comments its better to ignore fixing this for now as i see a need to capture full date + time and not floating values of time. Since fixing this will involve changing string format will submit as separate patch. Hence reverting the changes :)
> > > Source/WebKit2/UIProcess/WebContext.cpp:733 > > + String sampleLogFilePath = String::format("WebProcess%llu", static_cast<long long unsigned int>(now)); > > Ditto.
Same as above
> > > Source/WebKit2/ChangeLog:3 > > + Eliminate WebKit2 compilation warnings. > > It would be better if this said what compiler and platform these warnings were found with.
Done
Wajahat Siddiqui
Comment 13
2011-09-14 07:25:06 PDT
(In reply to
comment #7
)
> We normally want a separate bug for each patch. Putting two patches in a single bug is not good.
Correct, the older patch is obsolete.
WebKit Review Bot
Comment 14
2011-09-14 19:52:20 PDT
Comment on
attachment 107329
[details]
compiler warnings fix updated Clearing flags on attachment: 107329 Committed
r95154
: <
http://trac.webkit.org/changeset/95154
>
Adam Barth
Comment 15
2011-10-15 01:49:50 PDT
Comment on
attachment 107168
[details]
more compiler warnings fix Cleared Darin Adler's review+ from obsolete
attachment 107168
[details]
so that this bug does not appear in
http://webkit.org/pending-commit
.
Adam Barth
Comment 16
2011-10-25 20:01:09 PDT
Looks like this patch landed. If there are more bugs to fix, please open a new 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