Bug 142366 - [Win] JSC Build Warnings Need to be Resolved
Summary: [Win] JSC Build Warnings Need to be Resolved
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-05 15:23 PST by Brent Fulgham
Modified: 2015-03-10 12:29 PDT (History)
8 users (show)

See Also:


Attachments
the patch. (5.20 KB, patch)
2015-03-10 01:13 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
patch 2: applied Darin's feedback. (5.23 KB, patch)
2015-03-10 11:34 PDT, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-03-05 15:23:32 PST
There are a number of build warnings that need to be resolved. We are going to be switching build warnings to errors soon, which will turn these into build failures:

source\javascriptcore\bytecode\codeblock.cpp(622): warning C4701: potentially uninitialized local variable 'sourceCodeRepresentationDescription' used
source\javascriptcore\bytecode\codeblock.cpp(622): warning C4703: potentially uninitialized local pointer variable 'sourceCodeRepresentationDescription' used

..\dfg\DFGSpeculativeJIT32_64.cpp(114): warning C4245: 'initializing' : conversion from '' to 'uint32_t', signed/unsigned mismatch
..\dfg\DFGSpeculativeJIT32_64.cpp(118): warning C4245: '=' : conversion from '' to 'uint32_t', signed/unsigned mismatch
..\dfg\DFGSpeculativeJIT32_64.cpp(122): warning C4245: '=' : conversion from '' to 'uint32_t', signed/unsigned mismatch
..\dfg\DFGSpeculativeJIT32_64.cpp(126): warning C4245: '=' : conversion from '' to 'uint32_t', signed/unsigned mismatch

..\runtime\BasicBlockLocation.cpp(57): warning C4245: 'initializing' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch

source\javascriptcore\runtime\controlflowprofiler.cpp(117): warning C4701: potentially uninitialized local variable 'bestRange' used

..\..\jsc.cpp(367): warning C4645: function declared with __declspec(noreturn) has a return statement
Comment 1 Mark Lam 2015-03-10 01:13:27 PDT
Created attachment 248320 [details]
the patch.
Comment 2 Darin Adler 2015-03-10 10:35:25 PDT
Comment on attachment 248320 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=248320&action=review

> Source/JavaScriptCore/runtime/BasicBlockLocation.cpp:57
> +        unsigned minIdx = (unsigned)-1;

Maybe UINT_MAX since the previous line uses INT_MAX? Maybe std::numeric_limits<unsigned>::max() if we want to program in C++?
Comment 3 Mark Lam 2015-03-10 10:48:11 PDT
(In reply to comment #2)
> Maybe UINT_MAX since the previous line uses INT_MAX? Maybe
> std::numeric_limits<unsigned>::max() if we want to program in C++?

We have a practice of using (unsigned)-1 all over JSC, but I agree that it's time to move to using std::numeric_limits<unsigned>::max().  Will fix.
Comment 4 Mark Lam 2015-03-10 11:34:00 PDT
Created attachment 248339 [details]
patch 2: applied Darin's feedback.
Comment 5 Brent Fulgham 2015-03-10 11:40:41 PDT
Comment on attachment 248339 [details]
patch 2: applied Darin's feedback.

r=me
Comment 6 WebKit Commit Bot 2015-03-10 12:29:42 PDT
Comment on attachment 248339 [details]
patch 2: applied Darin's feedback.

Clearing flags on attachment: 248339

Committed r181334: <http://trac.webkit.org/changeset/181334>
Comment 7 WebKit Commit Bot 2015-03-10 12:29:47 PDT
All reviewed patches have been landed.  Closing bug.