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

Disable compiler warning

How do you disable compiler warnings in uVision 4? It's for a K20 procesor so it's an ARM Cortex M4. I tried the standard C++ #pragma warning but it didn't sppear to work...

Parents
  • How I hate these half answers certain posters give. It just annoys and proves nothing (except for the obnoxicity of the writer).

    Anyway, you've nearly got it.

    You can disable a specific warning. Say you want to disable warning 161. It can be done either as a command line parameter in the MiscControls section of

    --diagsuppress=161
    

    or as a pragma with

    #pragma diag_warning 161
    

    So even if you do find where to put the entry into a GUI like uVision, you still frequently have to find the relevant details concerning what you have to put in.

Reply
  • How I hate these half answers certain posters give. It just annoys and proves nothing (except for the obnoxicity of the writer).

    Anyway, you've nearly got it.

    You can disable a specific warning. Say you want to disable warning 161. It can be done either as a command line parameter in the MiscControls section of

    --diagsuppress=161
    

    or as a pragma with

    #pragma diag_warning 161
    

    So even if you do find where to put the entry into a GUI like uVision, you still frequently have to find the relevant details concerning what you have to put in.

Children