git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Friedrich Spee von Langenfeld <stehlampen@arcor.de>
To: git@vger.kernel.org
Subject: Errors and other unpleasant things found by Cppcheck
Date: Sat, 6 Jan 2018 23:13:23 +0100	[thread overview]
Message-ID: <5fb2c981-7a7b-5a0f-f2bb-b16189980d9b@arcor.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

Hi,

I analyzed the GitHub repository with Cppcheck. The resulting XML file 
is attached. Please open it in Cppcheck to view it comfortably.

Especially the bunch of errors could be of interest to you.

Greetings

Friedrich


[-- Attachment #2: Cppcheck results for Git.xml --]
[-- Type: text/xml, Size: 9108 bytes --]

<?xml version="1.0" encoding="UTF-8"?>
<results version="2">
    <cppcheck version="1.81"/>
    <errors>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: git_dir" verbose="Uninitialized variable: git_dir">
            <location file="config.c" line="219"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: oe" verbose="Uninitialized variable: oe">
            <location file="fast-import.c" line="3006"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: oe" verbose="Uninitialized variable: oe">
            <location file="fast-import.c" line="3023"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: mrtree" verbose="Uninitialized variable: mrtree">
            <location file="merge-recursive.c" line="2064"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: saved_namelen" verbose="Uninitialized variable: saved_namelen">
            <location file="read-cache.c" line="2107"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: explicit" verbose="Uninitialized variable: explicit">
            <location file="ref-filter.c" line="1287"/>
        </error>
        <error id="unknownEvaluationOrder" severity="error" msg="Expression &amp;#039;prev_ch=p_ch,(p_ch=*++p)!=&amp;#039;]&amp;#039;&amp;#039; depends on order of evaluation of side effects" verbose="Expression &amp;#039;prev_ch=p_ch,(p_ch=*++p)!=&amp;#039;]&amp;#039;&amp;#039; depends on order of evaluation of side effects">
            <location file="wildmatch.c" line="263"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\clean.c" line="268"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\clean.c" line="692"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\clean.c" line="758"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: string_list_item" verbose="Uninitialized variable: string_list_item">
            <location file="builtin\clean.c" line="357"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\clean.c" line="688"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\clean.c" line="1009"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\clone.c" line="1000"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\config.c" line="456"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\describe.c" line="161"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\describe.c" line="175"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: pos" verbose="Uninitialized variable: pos">
            <location file="builtin\interpret-trailers.c" line="46"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: tmp" verbose="Uninitialized variable: tmp">
            <location file="builtin\interpret-trailers.c" line="46"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\ls-files.c" line="259"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\name-rev.c" line="202"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\name-rev.c" line="213"/>
        </error>
        <error id="doubleFree" severity="error" msg="Memory pointed to by &amp;#039;buf&amp;#039; is freed twice." verbose="Memory pointed to by &amp;#039;buf&amp;#039; is freed twice.">
            <location file="builtin\notes.c" line="265"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: item" verbose="Uninitialized variable: item">
            <location file="builtin\repack.c" line="314"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: reaches" verbose="Uninitialized variable: reaches">
            <location file="builtin\rev-list.c" line="482"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: all" verbose="Uninitialized variable: all">
            <location file="builtin\rev-list.c" line="482"/>
        </error>
        <error id="leakNoVarFunctionCall" severity="error" msg="Allocation with malloc_startup, memcpy doesn&amp;#039;t release it." verbose="Allocation with malloc_startup, memcpy doesn&amp;#039;t release it.">
            <location file="compat\mingw.c" line="2139"/>
        </error>
        <error id="memleak" severity="error" msg="Memory leak: sbcset" verbose="Memory leak: sbcset">
            <location file="compat\regex\regcomp.c" line="3085"/>
        </error>
        <error id="memleak" severity="error" msg="Memory leak: mbcset" verbose="Memory leak: mbcset">
            <location file="compat\regex\regcomp.c" line="3085"/>
        </error>
        <error id="memleak" severity="error" msg="Memory leak: sbcset" verbose="Memory leak: sbcset">
            <location file="compat\regex\regcomp.c" line="3633"/>
        </error>
        <error id="memleak" severity="error" msg="Memory leak: mbcset" verbose="Memory leak: mbcset">
            <location file="compat\regex\regcomp.c" line="3633"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: table_size" verbose="Uninitialized variable: table_size">
            <location file="compat\regex\regcomp.c" line="2801"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: table_size" verbose="Uninitialized variable: table_size">
            <location file="compat\regex\regcomp.c" line="2804"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: lrr_count" verbose="Uninitialized variable: lrr_count">
            <location file="contrib\examples\builtin-fetch--tool.c" line="420"/>
        </error>
        <error id="uninitvar" severity="error" msg="Uninitialized variable: lrr_list" verbose="Uninitialized variable: lrr_list">
            <location file="contrib\examples\builtin-fetch--tool.c" line="427"/>
        </error>
        <error id="preprocessorErrorDirective" severity="error" msg="No header in #include" verbose="No header in #include">
            <location file="sha1dc\ubc_check.c" line="31"/>
        </error>
        <error id="preprocessorErrorDirective" severity="error" msg="No header in #include" verbose="No header in #include">
            <location file="sha1dc\ubc_check.c" line="371"/>
        </error>
        <error id="preprocessorErrorDirective" severity="error" msg="No header in #include" verbose="No header in #include">
            <location file="sha1dc\ubc_check.h" line="49"/>
        </error>
        <error id="memleak" severity="error" msg="Memory leak: entries" verbose="Memory leak: entries">
            <location file="t\helper\test-hashmap.c" line="129"/>
        </error>
        <error id="memleak" severity="error" msg="Memory leak: hashes" verbose="Memory leak: hashes">
            <location file="t\helper\test-hashmap.c" line="129"/>
        </error>
        <error id="syntaxError" severity="error" msg="Invalid number of character &amp;#039;{&amp;#039; when no macros are defined." verbose="Invalid number of character &amp;#039;{&amp;#039; when no macros are defined.">
            <location file="t\t4051\appended1.c" line="3"/>
        </error>
        <error id="syntaxError" severity="error" msg="Invalid number of character &amp;#039;{&amp;#039; when no macros are defined." verbose="Invalid number of character &amp;#039;{&amp;#039; when no macros are defined.">
            <location file="t\t4051\appended2.c" line="35"/>
        </error>
    </errors>
</results>

             reply	other threads:[~2018-01-06 22:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 22:13 Friedrich Spee von Langenfeld [this message]
2018-01-08 11:43 ` Errors and other unpleasant things found by Cppcheck Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fb2c981-7a7b-5a0f-f2bb-b16189980d9b@arcor.de \
    --to=stehlampen@arcor.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).