Keil™, An ARM® Company

C166 User's Guide

WARNING Compiler Directive

Abbreviation WA
Arguments 

A level and a numeric list of warning messages.

Default None.
µVision Options — C166 — Misc Controls.
Description 

The WARNING directive changes the level of individual compiler warnings. You may disable a selected warning, list it only once, or treat the warning message as an error. The WARNING directive also allows you to change the warning level in which the message is listed. Refer to Error Messages for a complete list of compiler warnings.

The WARNING directive has the following format:

WARNING level = warning « , warning »

where

levelis the level to which the warning is switched or a command that determines subsequent compiler action for the warning(s).
warningis the number of the warning message to modify.

Following are valid values for level:

LevelDescription
0Changes the warning level to 0.
1Changes the warning level to 1.
2Changes the warning level to 2.
3Changes the warning level to 3.
disableDisables the warning.
errorConverts the warning to an error.
onceLists only the first occurrence of the warning.
See Also WARNINGLEVEL
Example 
#pragma warning error = 95
   /* changes warning 95 to an error */

#pragma warning once = 56, 57
   /* report only the first occurrence */
   /* of warning 56 & 57 */