<div dir="ltr">Hi<br><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 17, 2013 at 12:36 PM, Dan Williams <span dir="ltr"></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>On Tue, 2013-12-17 at 12:17 -0500, Rahul Sundaram wrote:<br>
> Hi<br>
><br>
> In the last few days, I have been running cppcheck on quite a few programs<br>
> including systemd, transmission, libvirt, ndjbdns etc and cppcheck has<br>
> found real and potential bugs (null pointer dereferences, uninitialized<br>
> variables, memory & resource leaks etc) in each of them. I have reported<br>
> the ones I found and several developers have already fixed the issues. A<br>
> couple of examples<br>
<br>
</div>How are you running it to get it to print the warnings? I've tried<br>
--enable=warning, but all I get are includes errors (like <errno.h>)<br>
that aren't useful and are wrong AFAICT.<br></blockquote><div><br></div><div>Sorry. I should have specified that explicitly in my first mail. The simplest check is merely running<br><br></div><div>cppcheck . --quiet<br>
<br>
</div><div>You can run more extensive checks by using something like<br><br>cppcheck --enable=all --inconclusive --std=posix<br><br></div><div>The latter tends to return a lot more false positives but does find some more real bugs as well. <br>
<br></div><div>Rahul<br>
</div></div></div></div></div>