News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Suppress some warnings (allow code)

Started by markpotts, December 30, 2013, 11:11:08 PM

Previous topic - Next topic

markpotts

I am starting to use C::B for a cross compilation project (Windows -> Linux) and I am getting warnings for various coding practices I use, e.g.

    char *msg = "A message";
or
    msg = "Another message";

The typically warnings say something like:

  deprecated conversion from string constant to 'char*' [-Wwrite-strings]

If possible I would like to disable the warnings I consider acceptable. I assumed the parameter in brackets was some sort of compiler flag I could set. I tried adding (and selecting) the flag in Settings->Compiler but the warnings persist. Any advice would be welcome.

Thanks,
Mark

 

oBFusCATed

Read the manual of your compiler, there you'll find how to add warning suppressions!
Generally this is a topic that is outside the scope of the forum!
(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!]

markpotts

Thanks for the feedback. I checked the GCC compiler manual and found that I needed to specify "-Wno-write-strings". When I used this format the warnings were suppressed.