Bug 131728

Summary: [WebKit] Cleanup the build from uninitialized variable in JavaScriptCore
Product: WebKit Reporter: Shivakumar J M <shiva.jm>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: VERIFIED FIXED    
Severity: Normal CC: commit-queue, mhahnenberg, shiva.jm
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.