<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:lrn1986@gmail.com" title="LRN <lrn1986@gmail.com>"> <span class="fn">LRN</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - GCC warns that JSValue v is used without initialization"
href="https://bugs.webkit.org/show_bug.cgi?id=143770">bug 143770</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #250817 Flags</td>
<td>
</td>
<td>review?
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - GCC warns that JSValue v is used without initialization"
href="https://bugs.webkit.org/show_bug.cgi?id=143770#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - GCC warns that JSValue v is used without initialization"
href="https://bugs.webkit.org/show_bug.cgi?id=143770">bug 143770</a>
from <span class="vcard"><a class="email" href="mailto:lrn1986@gmail.com" title="LRN <lrn1986@gmail.com>"> <span class="fn">LRN</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=250817&action=diff" name="attach_250817" title="Silence the warning about JSValue 'v' being uninitialized">attachment 250817</a> <a href="attachment.cgi?id=250817&action=edit" title="Silence the warning about JSValue 'v' being uninitialized">[details]</a></span>
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]</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>