Trim trailing spaces.
This commit is contained in:
parent
29475d056a
commit
548234ba50
|
@ -39,7 +39,7 @@ uninitialized variables, unused functions" />
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h1>Cppcheck - Archive</h1>
|
<h1>Cppcheck - Archive</h1>
|
||||||
<p>This archive is for useful Cppcheck rules and library configuration files.</p>
|
<p>This archive is for useful Cppcheck rules and library configuration files.</p>
|
||||||
|
|
||||||
<p> If you have a rule or library configuration that you want to share, use this
|
<p> If you have a rule or library configuration that you want to share, use this
|
||||||
archive. Feel free to add any library or rule here.</p>
|
archive. Feel free to add any library or rule here.</p>
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
<term>callstack</term>
|
<term>callstack</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
callstack - if available
|
callstack - if available
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
<term>file</term>
|
<term>file</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
filename
|
filename
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
<term>id</term>
|
<term>id</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
message id
|
message id
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
<term>line</term>
|
<term>line</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
line number
|
line number
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
<term>message</term>
|
<term>message</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
verbose message text
|
verbose message text
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
<term>severity</term>
|
<term>severity</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
severity
|
severity
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
@ -754,7 +754,7 @@ void leak()
|
||||||
|
|
||||||
<para>Cppcheck doesn't normally report any errors for that:</para>
|
<para>Cppcheck doesn't normally report any errors for that:</para>
|
||||||
|
|
||||||
<programlisting># cppcheck test.c
|
<programlisting># cppcheck test.c
|
||||||
Checking test.c...</programlisting>
|
Checking test.c...</programlisting>
|
||||||
|
|
||||||
<para>Example configuration:</para>
|
<para>Example configuration:</para>
|
||||||
|
@ -773,7 +773,7 @@ Checking test.c...</programlisting>
|
||||||
|
|
||||||
<para>Output from <literal>Cppcheck</literal>:</para>
|
<para>Output from <literal>Cppcheck</literal>:</para>
|
||||||
|
|
||||||
<programlisting># cppcheck --library=something.cfg test.c
|
<programlisting># cppcheck --library=something.cfg test.c
|
||||||
Checking test.c...
|
Checking test.c...
|
||||||
[test.c:10]: (error) Memory leak: p</programlisting>
|
[test.c:10]: (error) Memory leak: p</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
@ -806,7 +806,7 @@ Checking test.c...
|
||||||
|
|
||||||
<para>Running <literal>Cppcheck</literal> now:</para>
|
<para>Running <literal>Cppcheck</literal> now:</para>
|
||||||
|
|
||||||
<para><programlisting># cppcheck --library=something.cfg test.c
|
<para><programlisting># cppcheck --library=something.cfg test.c
|
||||||
Checking test.c...
|
Checking test.c...
|
||||||
[test.c:10]: (error) Memory leak: p</programlisting>If the
|
[test.c:10]: (error) Memory leak: p</programlisting>If the
|
||||||
<literal>do_something</literal> takes the allocated memory and
|
<literal>do_something</literal> takes the allocated memory and
|
||||||
|
@ -822,7 +822,7 @@ Checking test.c...
|
||||||
</memory>
|
</memory>
|
||||||
</def></programlisting>Running Cppcheck now:</para>
|
</def></programlisting>Running Cppcheck now:</para>
|
||||||
|
|
||||||
<programlisting># cppcheck --library=something.cfg test.c
|
<programlisting># cppcheck --library=something.cfg test.c
|
||||||
Checking test.c...</programlisting>
|
Checking test.c...</programlisting>
|
||||||
|
|
||||||
<para>Cppcheck will often assume that functions "use" allocated memory.
|
<para>Cppcheck will often assume that functions "use" allocated memory.
|
||||||
|
@ -953,7 +953,7 @@ Checking test1.c...
|
||||||
|
|
||||||
<para>The output is:</para>
|
<para>The output is:</para>
|
||||||
|
|
||||||
<programlisting># cppcheck test.c
|
<programlisting># cppcheck test.c
|
||||||
Checking test.c...</programlisting>
|
Checking test.c...</programlisting>
|
||||||
|
|
||||||
<para>To tell Cppcheck that <literal>do_something</literal> is not a
|
<para>To tell Cppcheck that <literal>do_something</literal> is not a
|
||||||
|
@ -968,7 +968,7 @@ Checking test.c...</programlisting>
|
||||||
|
|
||||||
<para>Now Cppcheck will be able to detect the error:</para>
|
<para>Now Cppcheck will be able to detect the error:</para>
|
||||||
|
|
||||||
<programlisting>cppcheck --library=something.cfg test.c
|
<programlisting>cppcheck --library=something.cfg test.c
|
||||||
Checking test.c...
|
Checking test.c...
|
||||||
[test.c:8]: (error) Uninitialized variable: a</programlisting>
|
[test.c:8]: (error) Uninitialized variable: a</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue