This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCSTUDIO: Suppress custom #warnings

Part Number: CCSTUDIO

Tool/software:

Hi there,

I am wondering if I can suppress my custom sourcecode #warnings in the Build-output window.

Is there any option to choose, which warnings to display and which to suppress in build?

In my current case I'd like to suppress the warnings, that I typed with "#warning" in my sourcecode, to keep a better overview of the remaining warnings.

Thanks a lot in advance!

Matze

  • Hello,

    I assume you are looking for some filter option in the actual Console view. There is no such option. All build messages are sent (and displayed) in the Console.

    Thanks

    ki

  • I implemented a makro for my requirements:

    /* Makro for #warnings, which can be hidden when building*/
    
    // #define SHOW_CUSTOM_WARNINGS
    #undef SHOW_CUSTOM_WARNINGS
    
    #ifdef SHOW_CUSTOM_WARNINGS
    #define CUSTOM_WARNING(msg) _Pragma(STRINGIZE(message(msg)))
    #else
    #define CUSTOM_WARNING(msg)
    #endif
    
    #define STRINGIZE(x) STRINGIZE2(x)
    #define STRINGIZE2(x) #x

    that can be used like that:

     CUSTOM_WARNING("warning message that can be suppressed by #defining/#undefinig SHOW_CUSTOM_WARNINGS")

    Maybe someone finds it helpful and can use this ;)