Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Syntax Error #78

Open
lukas-hofstaetter opened this issue Dec 9, 2016 · 1 comment
Open

Syntax Error #78

lukas-hofstaetter opened this issue Dec 9, 2016 · 1 comment

Comments

@lukas-hofstaetter
Copy link

lukas-hofstaetter commented Dec 9, 2016

I just installed cppcheclipse. Then I configured the path to cppcheck. After that I appended a file (main.c) within the projects settings. Finally I just clicked right mouse key on to a file within my project an selected cppcheck>Run cppcheck.

In the eclipse's console I get this output:

=== Input stream for following process ===
src/file1.c
=== End of input stream for process ==
== Running cppcheck at 12/9/16 10:26 AM ==
Command line: /usr/bin/cppcheck --template={file};{line};{severity};{id};{message} -j 1 --append=src/main.c --file-list=-
cppcheck: '--append' is deprecated and will be removed in version 1.80. To supply additional information to cppcheck, use --library or --include.
Checking src/file1.c...
src/file1.c;340;error;syntaxError;syntax error
Duration 109 ms.

Well I tried to run cppcheck manually in ubuntu's terminal and it works pretty fine:

$ cppcheck file1.c 
Checking file1.c...
[file1.c:4]: (error) Array 'a[10]' accessed at index 10, which is out of bounds.

What I found out is, that the syntax error is produced because of my entry within the Appandage section. If I leave this section empty, the out put looks like this:

=== End of input stream for process ==
== Running cppcheck at 12/9/16 10:41 AM ==
Command line: /usr/bin/cppcheck --template={file};{line};{severity};{id};{message} -j 1 --file-list=-
Checking src/file1.c...
src/file1.c;4;error;arrayIndexOutOfBounds;Array 'a[10]' accessed at index 10, which is out of bounds.
Duration 102 ms.

This happened with cppcheck 1.75-1 in eclipse Neon and the very outdated eclipse 3.8, too.

@kwin
Copy link
Owner

kwin commented Jan 14, 2017

This rather looks like a bug in cppcheck. If you can reproduce the issue on the command line (using the same option --append) please report that bug at http://trac.cppcheck.net/.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants