Eclipse and Compiler Errors - how to fix?

Discussion to talk about software related topics only.
Post Reply
cfavreau
Posts: 29
Joined: Fri Jul 27, 2012 8:12 am

Eclipse and Compiler Errors - how to fix?

Post 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.
barttech
Posts: 135
Joined: Fri Feb 20, 2009 12:59 pm

Re: Eclipse and Compiler Errors - how to fix?

Post 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
cfavreau
Posts: 29
Joined: Fri Jul 27, 2012 8:12 am

Re: Eclipse and Compiler Errors - how to fix?

Post by cfavreau »

Thanks! That worked fantastically.
Post Reply