Menu

--template=gcc does not work correctly with -j

Rutger
2019-08-08
2019-08-08
  • Rutger

    Rutger - 2019-08-08

    The --tempalte=gcc option does not work correctly with the -j option. If I use -j the line containing the problem is no longer displayed.

    Without -j:

    $ cppcheck --enable=style --template=gcc iconvcvt.cpp
    Checking iconvcvt.cpp ...
    iconvcvt.cpp:22:10: warning: Variable 'cd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
        that.cd_ = (iconv_t)-1;
             ^
    

    With -j:

    cppcheck -j2 --enable=style --template=gcc iconvcvt.cpp
    Checking iconvcvt.cpp ...
    iconvcvt.cpp:22:0: warning: Variable 'cd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
    
    ^
    

    Any way to fix this?

     
  • Daniel Marjamäki

    Thanks! I created this ticket: https://trac.cppcheck.net/ticket/9260

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.