<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Running clang static analyzer on latest spice (I hope it comes out
normal on email - the bug is on line 416, totallen may be 0 because
of the assignment on line 412):<br>
<br>
<table class="code">
<tbody>
<tr>
<td class="line"><span class="keyword">static</span> <span
class="keyword">void</span></td>
</tr>
<tr>
<td class="num" id="LN392">392</td>
<td class="line">miStepDash (<span class="keyword">int</span>
dist, <span class="comment">/* distance to step */</span></td>
</tr>
<tr>
<td class="num" id="LN393">393</td>
<td class="line"> <span class="keyword">int</span>
*pDashIndex, <span class="comment">/* current dash */</span></td>
</tr>
<tr>
<td class="num" id="LN394">394</td>
<td class="line"> <span class="keyword">unsigned</span> <span
class="keyword">char</span> *pDash, <span class="comment">/*
dash list */</span></td>
</tr>
<tr>
<td class="num" id="LN395">395</td>
<td class="line"> <span class="keyword">int</span>
numInDashList, <span class="comment">/* total length of
dash list */</span></td>
</tr>
<tr>
<td class="num" id="LN396">396</td>
<td class="line"> <span class="keyword">int</span>
*pDashOffset <span class="comment">/* offset into current
dash */</span></td>
</tr>
<tr>
<td class="num" id="LN397">397</td>
<td class="line"> )</td>
</tr>
<tr>
<td class="num" id="LN398">398</td>
<td class="line">{</td>
</tr>
<tr>
<td class="num" id="LN399">399</td>
<td class="line"> <span class="keyword">int</span> dashIndex,
dashOffset;</td>
</tr>
<tr>
<td class="num" id="LN400">400</td>
<td class="line"> <span class="keyword">int</span> totallen;</td>
</tr>
<tr>
<td class="num" id="LN401">401</td>
<td class="line"> <span class="keyword">int</span> i;</td>
</tr>
<tr>
<td class="num" id="LN402">402</td>
<td class="line"> <br>
</td>
</tr>
<tr>
<td class="num" id="LN403">403</td>
<td class="line"> dashIndex = *pDashIndex;</td>
</tr>
<tr>
<td class="num" id="LN404">404</td>
<td class="line"> dashOffset = *pDashOffset;</td>
</tr>
<tr>
<td class="num" id="LN405">405</td>
<td class="line"> <span class="keyword">if</span> (dist <
pDash[dashIndex] - dashOffset) {</td>
</tr>
<tr>
<td class="num"><br>
</td>
<td class="line">
<div id="Path1" class="msg msgControl"
style="margin-left:5ex">
<table class="msgT">
<tbody>
<tr>
<td valign="top">
<div class="PathIndex PathIndexControl">1</div>
</td>
<td>Taking false branch</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td class="num" id="LN406">406</td>
<td class="line"> *pDashOffset = dashOffset + dist;</td>
</tr>
<tr>
<td class="num" id="LN407">407</td>
<td class="line"> <span class="keyword">return</span>;</td>
</tr>
<tr>
<td class="num" id="LN408">408</td>
<td class="line"> }</td>
</tr>
<tr>
<td class="num" id="LN409">409</td>
<td class="line"> dist -= pDash[dashIndex] - dashOffset;</td>
</tr>
<tr>
<td class="num" id="LN410">410</td>
<td class="line"> <span class="keyword">if</span>
(++dashIndex == numInDashList)</td>
</tr>
<tr>
<td class="num"><br>
</td>
<td class="line">
<div id="Path2" class="msg msgControl"
style="margin-left:5ex">
<table class="msgT">
<tbody>
<tr>
<td valign="top">
<div class="PathIndex PathIndexControl">2</div>
</td>
<td>Taking false branch</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td class="num" id="LN411">411</td>
<td class="line"> dashIndex = 0;</td>
</tr>
<tr>
<td class="num" id="LN412">412</td>
<td class="line"> <span class="mrange">totallen = 0</span>;</td>
</tr>
<tr>
<td class="num"><br>
</td>
<td class="line">
<div id="Path3" class="msg msgEvent" style="margin-left:5ex">
<table class="msgT">
<tbody>
<tr>
<td valign="top">
<div class="PathIndex PathIndexEvent">3</div>
</td>
<td>The value 0 is assigned to 'totallen'</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td class="num" id="LN413">413</td>
<td class="line"> <span class="keyword">for</span> (i = 0; i
< numInDashList; i++)</td>
</tr>
<tr>
<td class="num"><br>
</td>
<td class="line">
<div id="Path4" class="msg msgControl"
style="margin-left:5ex">
<table class="msgT">
<tbody>
<tr>
<td valign="top">
<div class="PathIndex PathIndexControl">4</div>
</td>
<td>Loop condition is false. Execution continues on
line 415</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td class="num" id="LN414">414</td>
<td class="line"> totallen += pDash[i];</td>
</tr>
<tr>
<td class="num" id="LN415">415</td>
<td class="line"> <span class="keyword">if</span> (totallen
<= dist)</td>
</tr>
<tr>
<td class="num"><br>
</td>
<td class="line">
<div id="Path5" class="msg msgControl"
style="margin-left:5ex">
<table class="msgT">
<tbody>
<tr>
<td valign="top">
<div class="PathIndex PathIndexControl">5</div>
</td>
<td>Taking true branch</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td class="num" id="LN416">416</td>
<td class="line"> dist = <span class="mrange">dist % totallen</span>;</td>
</tr>
<tr>
<td class="num"><br>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>