User Activity

  • Posted a comment on discussion General Discussion on cppcheck

    Hi, The below code can be compiled by GCC. But the cppcheck will report an error: error: syntax error [syntaxError] typedef __signed__ __int128 __s128 __attribute__((aligned(16))); The code: typedef __signed__ __int128 __s128 __attribute__((aligned(16))); void main(){} Could you please help take a look about this? Seems the cppcheck does not recognize such identifiers specific for GCC. Is it normal? Thanks!

  • Posted a comment on discussion General Discussion on cppcheck

    Hi, Below code will be checked as null pointer dereference. But with the function call replaced with a function pointer, no error message will be reported. Seems cppcheck will not recognize a function pointer as a function. char * func(){return 0;} int main() { char * (*f_p)(); f_p = func; char * p = func(); *p = 'a'; return 0; } Nothing reported. char * func(){return 0;} int main() { char * (*f_p)(); f_p = func; char * p = f_p(); *p = 'a'; return 0; }

  • Posted a comment on discussion General Discussion on cppcheck

    Ok, got it, thanks!

  • Posted a comment on discussion General Discussion on cppcheck

    Hi, For example, STDC is automatically defined by the gcc. Will the cppcheck add such configs automatically? How to handle such configs if need the configs to be defined for the checking. Do we need to add them in the command line options. Many thanks!

  • Modified a comment on discussion General Discussion on cppcheck

    Hi, I think this may be a bug. For example, with the command "cppcheck --project=/path/compile_commands.json -I /include_path main.c", the include_path will not take effect.

  • Modified a comment on discussion General Discussion on cppcheck

    Hi, I think this may be a bug. For example, with the command "cppcheck --project=/path/compile_commands.json -I /include_path", the include_path will not take effect.

  • Modified a comment on discussion General Discussion on cppcheck

    Hi, I think this may be a bug. For example, with the command: cppcheck --project=/path/compile_commands.json" -I "/include_path", the include_path will not take effect.

  • Posted a comment on discussion General Discussion on cppcheck

    Hi, I think this may be a bug. For example, with the command "cppcheck --project=/path/compile_commands.json" -I "/include_path", the include_path will not take effect.

View All

Personal Data

Username:
wy1630099
Joined:
2024-12-06 11:41:18.694000

Projects

  • No projects to display.

Personal Tools