Bug 131728 - [WebKit] Cleanup the build from uninitialized variable in JavaScriptCore
Summary: [WebKit] Cleanup the build from uninitialized variable in JavaScriptCore
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-16 03:55 PDT by Shivakumar J M
Modified: 2014-04-29 23:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.36 KB, patch)
2014-04-16 10:12 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shivakumar J M 2014-04-16 03:55:51 PDT
Found uninitialized variable used in JavaScriptCore/runtime/JSObject.cpp during webkit-efl port build.

/home/shiva.jm/webkit-git/svngit/WebKit/Source/JavaScriptCore/runtime/JSObject.cpp:824:17: warning: ‘v’ is used uninitialized in this function [-Wuninitialized]
         JSValue v;
Comment 1 Mark Hahnenberg 2014-04-16 10:04:39 PDT
(In reply to comment #0)
> Found uninitialized variable used in JavaScriptCore/runtime/JSObject.cpp during webkit-efl port build.
> 
> /home/shiva.jm/webkit-git/svngit/WebKit/Source/JavaScriptCore/runtime/JSObject.cpp:824:17: warning: ‘v’ is used uninitialized in this function [-Wuninitialized]
>          JSValue v;

This seems wrong. JSValue has a default constructor, so it's not uninitialized. Sounds like your compiler is confused.

One thing that might be worth fixing which would incidentally shut the compiler up is do add a default case with a RELEASE_ASSERT. If we don't hit a case in the switch statement then we have a debug ASSERT that will fire. Might as well add the release assert inside the branch that we'll never take.
Comment 2 Mark Hahnenberg 2014-04-16 10:12:05 PDT
Created attachment 229453 [details]
Patch
Comment 3 WebKit Commit Bot 2014-04-16 11:10:25 PDT
Comment on attachment 229453 [details]
Patch

Clearing flags on attachment: 229453

Committed r167364: <http://trac.webkit.org/changeset/167364>
Comment 4 WebKit Commit Bot 2014-04-16 11:10:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Shivakumar J M 2014-04-29 23:11:47 PDT
Bug is fixed tested in version 167979.