Menu

False positive: invalidPrintfArgType_sint with enum [v.2.2]

CHR
2020-10-06
2021-01-25
  • CHR

    CHR - 2020-10-06

    This might be related to the following ticket: https://trac.cppcheck.net/ticket/9937

    enum E : int;
    
    void f(E e)
    {
        printf("e = %d\n", e); // warning: %d in format string (no. 1) requires 'int' but the argument type is 'E'. [invalidPrintfArgType_sint]
    }
    
     
  • CHR

    CHR - 2021-01-25

    This was solved in v2.3.

     

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.