[Webkit-unassigned] [Bug 143770] GCC warns that JSValue v is used without initialization
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 15 10:12:22 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=143770
LRN <lrn1986 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #250817| |review?
Flags| |
--- Comment #1 from LRN <lrn1986 at gmail.com> ---
Created attachment 250817
--> https://bugs.webkit.org/attachment.cgi?id=250817&action=review
Silence the warning about JSValue 'v' being uninitialized
This shouldn't really happen, as the enumeration only has two values,
but gcc doesn't seem to understand it. Probably because it's a template.
Also, 'v' is an object, so there's an uninitialized object that participates
in a '=' operator, so that could be the cause for concern as well.
Fix this by completely separating two cases at the cost of code duplication.
Otherwise one would get this:
../webkitgtk-2.4.8/Source/JavaScriptCore/runtime/JSObject.cpp: In member function 'JSC::ContiguousJSValues JSC::JSObject::genericConvertDoubleToContiguous(JSC::VM&) [with JSC::JSObject::DoubleToContiguousMode mode = (JSC::JSObject::DoubleToContiguousMode)0u; JSC::ContiguousJSValues = JSC::ContiguousData<JSC::WriteBarrier<JSC::Unknown> >]':
../webkitgtk-2.4.8/Source/JavaScriptCore/runtime/JSObject.cpp:822:17: warning: 'v' is used uninitialized in this function [-Wuninitialized]
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150415/cd048bff/attachment-0001.html>
More information about the webkit-unassigned
mailing list