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!
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; }
Ok, got it, thanks!
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!
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.
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.
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.
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.