Eclipse CDT with MinGW displays warnings as errors -


i have little problem.

i installed eclipse cdt , created c project using mingw , simple warnings (like "unused variable" etc) shown errors.

the program build fine , can run it, these errors annoying.

i checked compiler settings , "warnings errors (-werror)" unchecked.

what do?

if -werror checked, build fail. way should check enforces take care of warnings right beginning.

you can suppress warnings (but not all), special options gcc (mingw). can see options needed suppress or warning in end of warning itself.

nevertheless, recommend against it. it's rather better resolve warnings right beginning. strive design projects in way able built -pedantic -wall -wextra -werror options. there 3 main benefits of approach:

  • your code bulletproof;
  • your code conform standard closely;
  • your code more portable across different compilers (as of them tend treat warnings errors default).

remember, leaving annoying warning flood bad habit, , should rid of right start.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -