Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: markpotts on December 30, 2013, 11:11:08 pm
-
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
-
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!
-
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.