Eclipse CDT with MinGW displays warnings as errors - eclipse

I have a little problem.
I just installed Eclipse CDT and created a C project using MinGW and all my simple warnings (like "unused variable" etc) are shown as errors.
The program build fine and I can run it, but all these errors are annoying.
I already checked the compiler settings and "Warnings as errors (-Werror)" is unchecked.
What do i do?

In my case, the problem was caused because the compiler/builder's message was in a different language than Eclipse.
Thus, Eclipse could not identify them as Warnings and thought they were Errors instead.
I solved by making an environment variable to set the compiler to the right language,
Thanks to this question
As the messages were sent on the right language, Eclipse changed the markers to warnings and compiled without any error messages.

If -Werror would be checked, the build would fail. By the way you should definitely check it so that it enforces you to take care of all the warnings right from the beginning.
You can suppress some warnings (but not all), with special options to GCC (MinGW). You can see which options are needed to suppress this or that warning in the end of the warning itself.
Nevertheless, I strongly recommend against it. It's rather better to resolve all the warnings right from the beginning. Strive to design your projects in the way that they are able to be built with -pedantic -Wall -Wextra -Werror options. There are 3 main benefits of this approach:
Your code would be nearly bulletproof;
Your code would conform to the standard closely;
Your code would be more portable across different compilers
(as some of them tend to treat some warnings as errors by default).
Remember, leaving the annoying warning flood is a bad habit, and you should definitely get rid of it right from the start.

Related

How to disable warnings in NetBeans output window?

Is it possible to disable WARNINGS (text in red) for the Output window, and only allow it to report errors?
I try a bit with the settings, and according to other posts I set Quiet for the Ant, and option -q for Maven, but it has no effect whatsoever.
So can anyone tell if it can be done at all, and if so, how, please?
From what I see the warnings are generated by the program you execute (or maybe by a library used by your program).
Ant or Maven are build tools to generate your program, that's why changing their verbosity level won't impact the program output.
You should check if your program accepts some command-line options, there might be one to adjust the verbosity level.
EDIT: just had a look at "aparapi", I see that it's a library, so you should check the library API if you can configure the verbosity level, or if you can redirect log messages to a file.

Eclipse suddenly shows lots of "List is a raw type" warnings

I've been working on JFreeChart in Eclipse for some time. Everything was going great and there were no warnings or errors last time I worked on it. The entire copy is local to my computer.
I opened the project tonight and suddenly there are hundreds of warnings - almost all of them because the project uses List without providing parameters. It says: List is a raw type. References to generic type List<E> should be parameterized
These warnings never showed up before and I don't remember changing anything in the last week that could have affected it.
Does anyone have any ideas of what might have caused this and how to turn them all off at once?
Thanks
The warning is controlled by 'Java / Compiler / Errors/Warnings / Generic types / Usage of raw type' in the Preferences (could be Project Specific or Global).

Eclipse Scala plug-in: "illegal cyclic inheritance"

I just updated to the latest Scala-IDE version on Eclipse, and it's highlighting loads of spurious "illegal cyclic inheritance" errors in code I know to be OK (it was before, and it still compiles and runs OK).
Any way to fix this? If not, how do I roll back to the previous version? I don't see any options to roll back or download earlier versions on the Scala IDE website.
Thanks.
edit: Never mind, it spontaneously sorted itself out after about 10 minutes sitting there showing errors. Will leave question here in case else anyone gets this.
"Project -> Clean Project" always helps me when Scala-IDE is showing weird error messages.
Sometimes errors will show in the editor, but not in the package explorer. Things still appear to compile ok when that occurs.

Warning: the current language does not match this frame

This shows up in the debugging console in Xcode. What does it mean and should I be concerned?
It generally means that you're debugging ObjC++ and that gdb has gotten confused about what language you're in the middle of. gdb often has trouble in ObjC++, which is one of many reasons to keep your C++ and ObjC separate as much as you can. A related error is along the lines of "No this pointer."

Eclipse CDT: how to get rid of a specific warning?

How do I get rid of the "deprecated conversion" warning in CDT? I know how to #pragma it out of the compilation process but the highlighting in the CDT is annoying!
The warning, more probably than not, comes from the compiler. If you compiled and got the warning and later on removed it from the compilation process by means of a pragma or compiler option, it might be the case that the IDE still remembers it. It should go away in a later compilation, or you can manually delete within the Problems windows.
If you have not removed it from the compilation process (that is, the warning comes out in each new compilation) this will be mainly useless as the warning will come back. But then again, if it is still there, the IDE is just reminding you.