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 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.

Warnings issued by the Clang front end do not use the numbered message system. Parser warning messages indicate the option that 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 -Wno-sign-conversion. This uses the "no-" form of the option indicated in the square brackets in the warning message.

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.