4.5.3.1 Disabling Messages

Each numbered warning message has a default number indicating a level of importance. This number is specified in the MDF and ranges from -9 to 9. The higher the number, the more important the warning.

Warning messages can be disabled by adjusting the warning level threshold using the -mwarn driver option, (see 4.6.4.2 Warn Option). Any warnings whose level is below that of the current threshold are not displayed.

The default threshold is 0 which implies that only warnings with a warning level of 0 or higher will be displayed by default. The information in this option is propagated to all compiler applications, so its effect will be observed during all stages of the compilation process.

When building for C99, the Clang front end is used. This application does not use the numbered message system. Warning messages coming from the parser indicate the option which allowed their generation, and this information can be used to disable the message. For example, if the following warning was issued:
init.c:8:11: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]
the warning could be disabled by using the option -Xparser -Wno-sign-conversion. This uses the "no-" form of the option indicated in the square brackets in the warning message. The -Xparser driver option passes the option argument to the parser (Clang) application.

All warnings from all applications can be disabled using the -w option.

Note: Disabling error or warning messages in no way fixes the condition that triggered the message. Always use extreme caution when disabling warning messages.