Menu

false positive with enumeration =1

Fraser
2018-07-30
2018-07-31
  • Fraser

    Fraser - 2018-07-30

    I get syntax errors with CPPCheck for enumerations that set an identifier to equal 1. Is this a known bug? I have CPPCheck 1.84.

    e.g.
    enum {
    bit0 = 1,
    };

     
  • Fraser

    Fraser - 2018-07-30

    When I start to analyse I get the message: "Failed to load the selected library 'windows.cfg', File not found." There is then a bigger message. Would it be best to reinstall CPPCheck?

     
  • versat

    versat - 2018-07-31

    I can not reproduce the problem with setting an identifier of an enum to 1. Not with 1.84 and not with the latest development sources.
    Do you get the error for the given example? Or could you post a minimal example where this error occurrs?

    If Cppcheck does not find windows.cfg i guess there really is something wrong with your installation. I would try to reinstall Cppcheck and test it again.
    If that does not work, can you give some details about your system and what installer you used?

     
  • Fraser

    Fraser - 2018-07-31

    I've reinstalled and both of these problems have gone. I have some other false positives I've not reported yet.

     

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.