Menu

unusedVariable not checked

Dzid
2024-06-13
2024-06-14
  • Dzid

    Dzid - 2024-06-13
    static int unusedVariable;
    int main(void){
    }
    

    ./cppcheck --enable=all test.c

    Checking test.c ...
    nofile:0:0: information: Active checkers: 107/802 (use --checkers-report=<filename> to see details) [checkersReport]
    

    I would expect unusedVariable to be reported but nothing shows up.
    If I move the unusedVariable inside main(), then it is reported.

    (I think I posted to wrong channel. )

     

    Last edit: Dzid 2024-06-13
  • CHR

    CHR - 2024-06-14
     

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.