Menu

Duplicate typedef seems to currupt type

Mike
2024-04-19
2024-04-23
  • Mike

    Mike - 2024-04-19

    I am developing some C code on a Raspberry Pi for an embedded system and using cppcheck to help with static analysis. I am using the command line, open source cppcheck version 2.13.
    See attached foo.c.
    When I run "cppcheck --platform=unspecified --enable=all foo.c", I receive a warning about an incorrect type being passed to printf(). I think that this warning is a false positive.

     
  • CHR

    CHR - 2024-04-22

    Is there no platform that matches your system? I wonder how well this check can work without type information.

     
    • Mike

      Mike - 2024-04-23

      cppcheck --platform=unix32 --enable=all foo.c ... yields the same result.

       
  • CHR

    CHR - 2024-04-23

    Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/12647

     

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.