Comments (5)
To help me resolve that issue, please provide further information.
1. What is the output you see in console, when running cppcheck.
2. Are there any errors in the error.log?
3. Could you attach a sample source which produces issues with cppcheck GUI but
not
with cppcheclipse.
Original comment by [email protected]
on 4 Feb 2010 at 4:06
from cppcheclipse.
The source code doesn't matter. For a quick test, the following will do
int main()
{
char a;
char b = 0;
char c[10];
char *d = 0;
strcpy(d, "something"); // Produces error
a = c[b]; // Produces warning
}
The Java console shows:
Executing '"C:\Program Files\Cppcheck\cppcheck.exe" --xml --enable=all
C:\junk.cpp'
<?xml version="1.0"?>
Checking C:\junk.cpp...
<results>
<error file="C:\junk.cpp" line="10" id="nullPointer" severity="error"
msg="Possible
null pointer dereference: d"/>
</results>
Duration 125 ms.
However, running the same command in a DOS command prompt will yield something
different.
c:\projects>"C:\Program Files\Cppcheck\cppcheck.exe" --xml --enable=all
C:\junk.cpp
<?xml version="1.0"?>
<results>
Checking C:\junk.cpp...
<error file="C:\junk.cpp" line="12" id="charArrayIndex" severity="style"
msg="Warning
- using char
variable as array index"/>
<error file="C:\junk.cpp" line="10" id="nullPointer" severity="error"
msg="Possible
null pointer d
ereference: d"/>
Checking usage of global functions..
</results>
Original comment by [email protected]
on 4 Feb 2010 at 5:47
from cppcheclipse.
Thanks for that example, I could now reproduce it. This is caused by how the
command
line arguments are given to cppcheck with Java. There were some spaces too much,
which lead to some options not being recognized by cppcheck. In your example,
only
the --xml was evaluated by cppcheck, but not the --enable=all.
After spotting that bug, I will try to upload a new version as soon as possible.
Original comment by [email protected]
on 4 Feb 2010 at 7:51
- Changed title: Command line arguments not correctly transmitted to cppcheck
- Changed state: Started
from cppcheclipse.
Original comment by [email protected]
on 4 Feb 2010 at 9:28
- Changed state: Verified
- Added labels: Milestone-0.9.5
from cppcheclipse.
Thanks for the fix.
Original comment by [email protected]
on 5 Feb 2010 at 6:23
from cppcheclipse.
Related Issues (20)
- Cannot install cppcheclipse 0.98 on Eclipse Helios HOT 3
- cppcheckclipse_0.9.8.zip is ignored in dropins folder HOT 2
- NullPointerException running cppcheck HOT 4
- Not expanding variables ${name} HOT 1
- Can't include files not in workspace directory HOT 7
- cppcheclipse uses file names on command-line (instead of from file with --file-list) which limits the amount of files that can be used as input HOT 12
- Errors disappear when compiling multiple projects HOT 1
- File not included in the Problems pane HOT 6
- Add suppressions for entire directories HOT 3
- cppcheclipse produce no output in the problems tab HOT 4
- can't configure wrapper script for cppcheck in preferences HOT 3
- cppcheclipse fails to check when C++ 03 is specified. HOT 4
- Could not initialize cppcheck with Eclipse Kepler, OSX, SUbversion HOT 5
- Error reading filename of appendages HOT 1
- cppcheck option not showing in Eclipse->P HOT 2
- template flag is hard-coded, can't change to 'gcc' HOT 2
- parse error, not problems reported HOT 6
- Creating xml output file doesn't work HOT 1
- Source files and paths not displaying HOT 4
- Null Pointer For Non-Existent Path
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppcheclipse.