User Activity

  • Posted a comment on discussion General Discussion on cppcheck

    I have a few functions with default arguments, and I they get flagged with misra-c2012-17.8. The following function shows the false positive behavior: int test_func(const int x, const int y, const int z = 0) { return (x * y * z); } z is not modified, but misra-c2012-17.8 is flagged on the function declaration.

  • Posted a comment on discussion General Discussion on cppcheck

    I'm running cppcheck on windows, but I'm analyzing an ARM codebase and have no libraries checked in the project configuration. Adding ERROR to the undefines list does appear to fix the issue, though it's not clear to me why I was picking up a #define from outside my selected libraries, include dirs, and source dirs. Is there a misconfiguration on my end? Thank you!

  • Posted a comment on discussion General Discussion on cppcheck

    I'm attempting to run cppcheck 2.5 on a project that includes some vendor code, and I've found the the following enum causes a syntax error: typedef enum { SUCCESS = 0, ERROR = !SUCCESS } ErrorStatus; I confirmed by making a .cpp file (attached) containing only that enum and analyzing it independent of any other code: [test.cpp:3] (error) syntax error: 0 = [syntaxError]

  • Modified a comment on discussion General Discussion on cppcheck

    I did some poking around, and it looks like the rules parser doesn't handle multi-line rules or rule text that starts with a special character . I'd been adding rules with multiple parts like this: Rule x.y Required (a) Rule x.y part a (b) Rule x.y part b If I remove the parenthesis and make the rule a single line, like this: Rule x.y Required Rule x.y part a;Rule x.y part b The parser appears to work. Regarding 'special characters', it appears that any non-alphanumeric character causes a rule to...

  • Modified a comment on discussion General Discussion on cppcheck

    I did some poking around, and it looks like the rules parser doesn't handle multi-line rules or rule text that starts with a special character . I'd been adding rules with multiple parts like this: Rule x.y Required (a) Rule x.y part a (b) Rule x.y part b If I remove the parenthesis and make the rule a single like, like this: Rule x.y Required Rule x.y part a;Rule x.y part b The parser appears to work. Regarding 'special characters', it appears that any non-alphanumeric character causes a rule to...

  • Posted a comment on discussion General Discussion on cppcheck

    I did some poking around, and it looks like the rules parser doesn't handle multi-line rules or rule text that starts with a special character . I'd been adding rules with multiple parts like this: Rule x.y Required (a) Rule x.y part a (b) Rule x.y part b If I remove the parenthesis and make the rule a single like, like this: Rule x.y Required Rule x.y part a;Rule x.y part b The parser appears to work. Regarding 'special characters', it appears that any non-alphanumeric character causes a rule to...

  • Modified a comment on discussion General Discussion on cppcheck

    I have a MISRA rules file that worked with cppcheck 2.1, but with 2.5, the rules are not being parsed. My file is the format shown in the repo: Rule 14.4 Rule text The cppcheck gui, however, shows: misra violation 1404 with no text in the supplied rule-texts-file [misra-c2012-14.4] Has the format changed, or is this a bug with the misra scripts? Thanks!

  • Posted a comment on discussion General Discussion on cppcheck

    I have a MISRA rules file that worked with cppcheck 2.1, but with 2.5, the rules are not being parsed. My file is the format shown in the repo: Rule 14.4 Rule text The cppcheck gui, however, shows: misra violation 1404 with no text in the supplied rule-texts-file [misra-c2012-8.2] Has the format changed, or is this a bug with the misra scripts? Thanks!

View All

Personal Data

Username:
mbanducci
Joined:
2020-05-13 19:04:34

Projects

  • No projects to display.

Personal Tools

Monday.com Logo