<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - cppcheck report"
href="https://bugs.freedesktop.org/show_bug.cgi?id=72088">72088</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>openchrome-devel@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>cppcheck report
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>serval2412@yahoo.fr
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver/openchrome
</td>
</tr>
<tr>
<th>Product</th>
<td>xorg
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=89921" name="attach_89921" title="cppcheck report">attachment 89921</a> <a href="attachment.cgi?id=89921&action=edit" title="cppcheck report">[details]</a></span>
cppcheck report
I runned cppcheck git updated today on OpenChrome git updated today.
There are certainly false positives since cppcheck is a static analyzer for C++
(I think about "scope of <var> can be reduced) but for the rest, it could help.
eg:
[src/via_bandwidth.c:485] -> [src/via_bandwidth.c:483]: (style) Found duplicate
branches for 'if' and 'else'.
[src/via_bandwidth.c:502] -> [src/via_bandwidth.c:500]: (style) Found duplicate
branches for 'if' and 'else'.
[src/via_driver.c:1107]: (error) Memory pointed to by 'pEnt' is freed twice.
[src/via_dri.c:481]: (error) Memory leak: pVIAConfigPtrs
[src/via_driver.c:901]: (error) Uninitialized variable: old_width
[src/via_driver.c:900]: (error) Uninitialized variable: old_height
[src/via_driver.c:902]: (error) Uninitialized variable: old_dwidth
I attached the full report (I used --enable=all for running cppcheck).</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>