Page 1 of 1

Eclipse and Compiler Errors - how to fix?

Posted: Wed Aug 08, 2012 8:49 am
by cfavreau
I have a bit of an issue (more of an annoyance). It appears that the compiler and Eclipse have a different idea of what is an error. For example:

char mystring[32];
snprintf(mystring, 32, "Example Code...");

This compiles fine. However Eclipse marks it with a bug and indicates in my project Explorer that I have an error in the file. It says that the arguments are invalid. It does this for memset(), strncpy() and other functions from string.h I think.

Pretty much right now I ignore it since it does not produce a compiler error... however it would be nice to know how to fix it.

Thanks, Chris F.

Re: Eclipse and Compiler Errors - how to fix?

Posted: Thu Aug 09, 2012 12:04 pm
by barttech
I had this problem too.
I turned off that item in the Codan section.
Under Properties you can choose specific items for errors or warnings from Code Analysis.
It seems that Codan has disappeared with 2.6.0.025? I had turned it off, then updated NBEclispe,
and now I can't find it any more.
Sam

Re: Eclipse and Compiler Errors - how to fix?

Posted: Wed Aug 15, 2012 1:20 pm
by cfavreau
Thanks! That worked fantastically.