This code will seg fault on Redhat linux under gcc. The problem is the strcmp does not like NULL parameters. I can't seem to just run a scanner like cppcheck, flawfinder, semgrep, etc and find this issue. Is there something I might be missing or do I have to write a custom rule for this? #include <stdio.h> #include <stdlib.h> #include <string.h> char* greeting(int value) { switch (value) { case 1: return strdup("hello"); case 2: return strdup("hola"); case 3: return strdup("bon jour"); default: return...
Tried it with cppcheck 2.8 and it still didn't work. It seems to ignore the directive at times and give you absolute line numbers. At other times, it seems like the "filename" given from the line directive is forgotten or it uses the wrong one.
Truthfully, it does sort of, ProC pre-compiler coverts C code that has embedded SQL into pure C code. The issue: This ProC process will create some structs and variables before all your code in a filename.c file. At the top of your code, but not the top of this new file. It is nice enough to set a #line 1 "orginalfname.sc" and it will do the same before/after sql statements because it is referencing the original file name. The problem: Occurs when cppcheck finds issue with the generated code that...
Truthfully, it does sort of. ProC precompiler coverts C code that has embedded SQL into pure C code. The issue: in this process it will create some structs and variables before all your code. At the top of your code, but not the top of this new file it is even nice enough to set a #line 1 "orginalfname.sc" and it will do the same for then on before/after sql statements because it is refencing the original fname name. The problem: comes in when cppcheck finds issue with the generated code that comes...
How to correctly install Oneshot 0.66 on Ubuntu ?
I am trying the "pex" format for distribution which has incredible promise. I still...
The Linux version is very experimental, but I agree, we should display the "running...
"Info Window" Bug on "Ubuntu" version.