• Bug#1102259: cppcheck: fails to find libraries

    From Richard Lewis@21:1/5 to All on Sun Apr 6 21:30:02 2025
    Package: cppcheck
    Version: 2.10-2
    Severity: normal
    X-Debbugs-Cc: richard.lewis.debian@googlemail.com

    Dear Maintainer,

    Is it expected that cppcheck fails to find any standard include files?

    $ cat foo.c
    #include <stdio.h>
    void main(void){}

    $ cppcheck --enable=all foo.c
    nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingIncludeSystem]

    $ cppcheck --enable=all foo.c --check-config
    /tmp/foo.c:1:0: information: Include file: <stdio.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]

    but it's in /usr/include?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Lewis@21:1/5 to All on Tue Apr 15 20:10:02 2025
    On Mon, 7 Apr 2025, 20:37 Joachim Reichel, <joachim.reichel@posteo.de>
    wrote:

    Hi Richard,

    yes, that's expected as explained in the message from the second
    invocation.


    hi - thanks for replying.



    There is no default include path in cppcheck. You can add it explicitly,
    but
    typically you don't want to check the standard library headers. And if you try
    it, you'll see that it will check only a subset of the possible configurations
    anyway.



    i think the message could be improved!


    It should be more like "Ignoring #include at line xxx" that would be a lot more understandable

    <div dir="auto"><div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 7 Apr 2025, 20:37 Joachim Reichel, &lt;<a href="mailto:joachim.reichel@posteo.de">joachim.reichel@posteo.de</a>&gt; wrote:<br></div><blockquote
    class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Richard,<br>

    yes, that&#39;s expected as explained in the message from the second invocation.</blockquote></div></div><div dir="auto"><br></div><div dir="auto">hi - thanks for replying.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div
    class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
    There is no default include path in cppcheck. You can add it explicitly, but <br>
    typically you don&#39;t want to check the standard library headers. And if you try <br>
    it, you&#39;ll see that it will check only a subset of the possible configurations <br>
    anyway.</blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">i think the message could be improved!</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"> It should be more like &quot;Ignoring #
    include at line xxx&quot; that would be a lot more understandable</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Lewis@21:1/5 to All on Fri Apr 18 11:40:02 2025
    On Fri, 18 Apr 2025, 10:30 Joachim Reichel, <joachim.reichel@posteo.de>
    wrote:

    i think the message could be improved!


    It should be more like "Ignoring #include at line xxx" that would be a
    lot
    more understandable

    Possibly. You could suggest that on the cppcheck mailinglist (maybe check their
    archives if that has been discussed before).


    ill do that - can you point me to where that mailing list is!

    <div dir="auto"><div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, 18 Apr 2025, 10:30 Joachim Reichel, &lt;<a href="mailto:joachim.reichel@posteo.de">joachim.reichel@posteo.de</a>&gt; wrote:<br></div><
    blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; i think the message could be improved!<br>
    &gt; <br>
    &gt; <br>
    &gt;   It should be more like &quot;Ignoring #include at line xxx&quot; that would be a lot <br>
    &gt; more understandable<br>

    Possibly. You could suggest that on the cppcheck mailinglist (maybe check their <br>
    archives if that has been discussed before).<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">ill do that - can you point me to where that mailing list is!</div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)