Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
suggestion: supress warnings of included headers of libraries
chameleon:
The idea comes from this:
My program uses 'boost'. 'boost' has a lot of headers and they create lots of innocent warnings.
I don't care about 'boost' warnings. Only about my program's warnings.
So the suggestion:
A (default: off) option in CodeBlocks preferences which suppress in window 'build messages' all warnings come from files not included in project.
So if header is "boost_thread.hpp" no warnings because does not belong to project's files.
if header is "my_program_header.h" warnings appear because it is project's file.
I need to know what is your thought about this.
stahta01:
Not worth doing in my opinion; have you looked at the compiler to see if you can fix it in the source code?
GCC has the idea of system headers that reduce the messages the compiler generates on "system headers"
Tim S.
MortenMacFly:
--- Quote from: chameleon on November 11, 2009, 03:19:09 pm ---So if header is "boost_thread.hpp" no warnings because does not belong to project's files.
--- End quote ---
Possible and implemented in trunk. Check the compiler options, tab "Other settings" -> "Compiler putput to be ignored". Add "boost_thread.hpp" to these strings and you are done. It has some side effects, though: It's slower and you might also filter lines of an error that does not have it's root in this header, but this header might be in the error message as reference. So take care.
thomas:
I wasn't sure whether I should complain about another useless feature or praise the best idea ever. I've settled for the latter, if it works (not tried yet), then it's really great :)
What's with template warnings/errors, though? These would often be be of the form
--- Code: ---xyz/boost/detail/blah-impl.hpp : 123: (blah blah blah)
instanciated from: xyz/boost/blah.hpp : 643
instanciated from: (...)
instanciated from: myprojects/blubb/blubb.cpp : 34
--- End code ---
What's interesting about the message is the very last line, which points to the actual error. However, as I understand it, the whole message might get filtered now?
MortenMacFly:
--- Quote from: thomas on November 12, 2009, 10:49:08 am ---However, as I understand it, the whole message might get filtered now?
--- End quote ---
Depends on the filter you setup. What you want is filtering lines with "xyz/boost" probably. In that case there last lien would remain and the previous ones are hidden.
Look: For me it already is/was really helpful to filter annoying warning messages coming from wx when I enable "all warnings" from the compiler. I don't want to modify the wx (whats-o-ever) framework, just my code. For this purpose it's working great I'd say... for me at least.
Navigation
[0] Message Index
[#] Next page
Go to full version