User forums > Help

How To Disable Specific Warnings?

<< < (2/3) > >>

stahta01:
Code::Blocks is NOT a compiler!
We have no idea what compiler you are using!
We can NOT help you when you give very incomplete information!

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Please also read this site rules. http://forums.codeblocks.org/index.php/topic,9996.0.html

Tim S.


--- Quote from: Archibald on August 11, 2016, 12:55:12 pm ---Is this working in 16.01?

I have tried to add "-Wunused-variable" but I can't make it to work... Had no such problems in previous version.

What exacly I did:
1) Settings/Compiler/Compiler Flags and then added "New flag".
2) Also tried the old route Settings/Compiler/Other compiler options and then added it manually as: -Wunused-variable
None have any effect...

--- End quote ---

raynebc:
I use compiler flags (for MinGW) in my Codeblocks project and it seems to work perfectly fine as of the latest nightly release.  The Codeblocks feature itself is functioning as expected.

Archibald:
I'm using MinGW, the one which comes with the standard package. I would not ask if I were using some other compiler. That's why I find it odd that I can't make it to work since I have used only default setup... Any clues what could be the problem? Or do I set those flags incorrectly somehow? Any tips?

EDIT: I managed to make it work by adding those flags to "Other Settings" instead of "Compiler Settings/Other compiler options". Is that the place where I should have put those in the first place?

EDIT2: Tested it several times and also adding flags (via the menu "New flag") does not work while adding the same flag via "Other Settings" works perfectly. Using the existing predefined flags works as intended, just adding new ones.

BlueHazzard:
1)

--- Quote from: stahta01 on August 11, 2016, 05:55:23 pm ---http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

--- End quote ---
we can't really help if you don't provide information on what is not working....

2) The right place to add your compiler variables is
Project->Build options
make sure you have selected the right target on the right tree control. If you want to apply the settings for all targets then the top most entry (aka project name) has to be selected
then go to the "Compiler" tab and look if it is found in the list. If it is found check it.
If not there are two ways to add it:
2.1) you can add it by creating a new flag by "right click->new flag" provide a name, and the flag and hit "ok"
now you have to search your flag in the list and select it (mark it with a tick)
2.2) A more faster solution would be to go to the "Compiler Settings->Other compiler options" tab. There you can add the compiler switch line per line..

If something is not working and you need help, post the compiler log... we don't know what you are doing, and if you provide us with the compiler log, wen can instantly tell what is going wrong, without asking 1000 questions, and telling you 200 ways to do things... It is simply faster and not as time wasteful...

greetings

Archibald:
Note: I got it working already, but it works only if I enter it via Settings/Global Compiler Settings/Other Settings, all other are ignored. Just wanted to figure it out why.

That's the compiler log "warning: unused variable 'cnt' [-Wunused-variable]", pretty straightforward :) I want this warning disabled.

I have tried to do it via Settings/Compiler Settings/Compiler Flags (no effect)
I have tried to do it via Settings/Compiler Settings/Other compiler options (no effect)
I have tried to do it via Project/Build options/Compiler Flags (all trees: main, Debug, Release)  (no effect)
Only when I do it via Settings/Global Compiler Settings/Other Settings (works as intended, no more warnings of this type)

It's strange...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version