News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Remove specific warning messages from compiler output

Started by pozzugno, October 20, 2011, 11:42:41 AM

Previous topic - Next topic

pozzugno

Dear forum,

I'm using a compiler that doesn't allow me to disable specific warning messages through command line options. Now I'm interested to increase the level of warning messages output from compiler, but many messages aren't useful to me and I'd like to remove them.

Can C::B remove automatically the lines from compiler output that contain specific word (like W10298) at a project level (in the Project->Build Options window)? I tried but without success. Alternatively, is it possible at global level (in Settings->Compiler and debugger window)?

Another alternative could be the use of "grep -v" command. How can I pipe the compiler output to grep at a project level or global level?

Jenna

If you use a recent version of C::B (if I remember correctly after 10.05 release, aka nightly build), you can add words to ignore to "Settings -> Compiler and debugger -> Global compiler settings -> Other settings -> Compiler output to be ignored".

As far as I know, it's global for all compilers.

pozzugno

Quote from: jens on October 20, 2011, 12:06:19 PM
If you use a recent version of C::B (if I remember correctly after 10.05 release, aka nightly build), you can add words to ignore to "Settings -> Compiler and debugger -> Global compiler settings -> Other settings -> Compiler output to be ignored".

As far as I know, it's global for all compilers.
I found this option in 10.05 release and you were right, this option is global for all compilers... too bad  :(

MortenMacFly

Quote from: pozzugno on October 20, 2011, 12:41:25 PM
I found this option in 10.05 release and you were right, this option is global for all compilers... too bad  :(
So what? I guess not many compilers issue a "W10298" warning. So the question is, whether you can apply a filter that is active for your compiler, only.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

pozzugno

Quote from: MortenMacFly on October 20, 2011, 01:10:26 PM
So what? I guess not many compilers issue a "W10298" warning.
I'm sorry, in my original post there was just an example. I'm interested to disable many warning messages like the following:
  W1049C
  W1107C
  W1264C
and so on. I don't know if they are common warning codes that other compilers may use.

Quote from: MortenMacFly on October 20, 2011, 01:10:26 PM
So the question is, whether you can apply a filter that is active for your compiler, only.
Yes, it could be a better solution: specify a filter for a specific compiler and not for all (I think remove the same message for all compiler isn't often useful). But it seems the option "Compiler output to be ignored" is a "Compiler-indipendent option".


Freem

You ask for how to pipe the result of the compiler into the grep...
I never used it, but, maybe in:
settings -> compiler -> other settings -> advanced options -> [warning] -> command ?
But it will also affect all your compiler and projects...

I thought also about about another possibility I have never used, the scripting:
project properties -> build scripts
But I really don't know what they can do...