This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is there a way to disable specific warnings ?

I'm using uV 4.70.0.0, compiler version is 5.03.0.24.

Is there a way to disable specific warnings? In other Keil toolchains I seem to remember there was a command-line control that allowed this. I can't seem to find a similar control in this ( ARM ) compiler, rather all I can find in the manual is the -W which disables all warnings. Am I missing something ?

Thanks

Parents
  • Well, if you withold the relevant detail you must expect the trivial answer!

    What is it that makes it more attractive for you to suppress the warning(s) than to fix the code? We can't know if you don't say.

    Yes, there are a few cases where "keeping the compiler happy" can be more effort than it's worth - but why not show some evidence that this is really one of those cases? You haven't given any reason to believe that it is.

    Even when "keeping the compiler happy" is more effort than it's worth, it's debatable whether suppressing the warning is a good approach. Documenting the expected warning may be more appropriate...

Reply
  • Well, if you withold the relevant detail you must expect the trivial answer!

    What is it that makes it more attractive for you to suppress the warning(s) than to fix the code? We can't know if you don't say.

    Yes, there are a few cases where "keeping the compiler happy" can be more effort than it's worth - but why not show some evidence that this is really one of those cases? You haven't given any reason to believe that it is.

    Even when "keeping the compiler happy" is more effort than it's worth, it's debatable whether suppressing the warning is a good approach. Documenting the expected warning may be more appropriate...

Children
No data