Author Topic: Suppress compiler warnings fired off from 3rd party libraries.  (Read 6879 times)

Offline RoestVrijStaal

  • Single posting newcomer
  • *
  • Posts: 5
Suppress compiler warnings fired off from 3rd party libraries.
« on: November 10, 2014, 01:48:09 pm »
Hello,

I compile with -Wswitch-default as extra safeguard to keep my code bug free at switch-blocks.

Unfortunately in SDL, the default-statement is often forgotten in switches which smuggle my build logs. I couldn't find a way in the Compiler-settings-dialogue to filter those warnings out, so I only get warnings about my own code.

Is there a way to suppress compiler warnings which are caused in include directories of 3rd party libraries?

Best Regards,

RoestVrijStaal

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Suppress compiler warnings fired off from 3rd party libraries.
« Reply #1 on: November 10, 2014, 03:29:12 pm »
Likely yes, but this would likely be a compiler fix/settings or library fix/settings instead of a Code::Blocks fix/setting change.

And the compiler settings are very rarely a valid topic on this site; once you figure out the setting for your compiler and you need help on where to enter them in CB that is a perfect question for this site.

You will likely need to do changes to your source code  for a fix; which is also not a valid topic for this site.

I suggest reading the rules on valid topic and the CB FAQs.
http://forums.codeblocks.org/index.php/topic,9996.0.html
http://wiki.codeblocks.org/index.php?title=FAQ

Tim S.

 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Suppress compiler warnings fired off from 3rd party libraries.
« Reply #2 on: November 10, 2014, 04:03:36 pm »
If you are using GCC (or similar), -isystem might be useful.

Though yes, this is not exactly C::B related...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Suppress compiler warnings fired off from 3rd party libraries.
« Reply #3 on: November 10, 2014, 06:16:54 pm »
I don't think this is possible, unfortunately.
SDL is not a system library.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline RoestVrijStaal

  • Single posting newcomer
  • *
  • Posts: 5
Re: Suppress compiler warnings fired off from 3rd party libraries.
« Reply #4 on: December 20, 2014, 05:14:11 pm »
Whoa, I didn't expect the thumpcard "Compiler-related issue, Not our problem, read the rules" is played so early in the game. Beat me how this isn't related to C::B anyway, because the kind of compiler used in this case doesn't make sense.

Ok, allow me to reform the question to this:
Is it possible to add a whitelist/blacklist filter in the Build Messages tab?

Informational side note:
The build message tab has a File column already. But a way of sorting it's entries doesn't seem to be implemented.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Suppress compiler warnings fired off from 3rd party libraries.
« Reply #5 on: December 20, 2014, 06:10:47 pm »
There is one feature you can try, but I don't know how good it will work and it will be applied to all projects.

Settings -> Compiler -> your compiler -> Other settings -> Compiler output to be ignored

About the sorting, it is not simple to do it these days.
Compilers produce multiple lines of text that are related to each other and their order is important.
If we do simple sorting we'll mess this up.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline RoestVrijStaal

  • Single posting newcomer
  • *
  • Posts: 5
Re: Suppress compiler warnings fired off from 3rd party libraries.
« Reply #6 on: February 03, 2015, 06:11:13 pm »
There is one feature you can try, but I don't know how good it will work and it will be applied to all projects.

Settings -> Compiler -> your compiler -> Other settings -> Compiler output to be ignored

About the sorting, it is not simple to do it these days.
Compilers produce multiple lines of text that are related to each other and their order is important.
If we do simple sorting we'll mess this up.
It worked, till yesterday when I added another evil entry to that list.

Unfortunately I didn't have a version of my default.conf-file of before the action, so I can't diff between the current state and previous state and explain what's going wrong in my config file.
« Last Edit: February 03, 2015, 07:06:27 pm by RoestVrijStaal »