Keil™, An ARM® Company

Cx51 User's Guide

WARNINGLEVEL Compiler Directive

Abbreviation WL
Arguments A number from 0-2.
Default WARNINGLEVEL (2)
µVision Options — C51 — Warnings.
Description 

The WARNINGLEVEL directive suppresses certain compiler warnings based on the level of the warning. Refer to Error Messages for a complete list of compiler warnings.

Warning LevelDescription
0Disables most compiler warnings.
1Lists only those warnings which may generate incorrect code.
2 (Default)Lists all warnings including those about unused variables, expressions, or labels.
Example 
C51 SAMPLE.C WL (1)

#pragma WARNINGLEVEL (0)

Related Knowledgebase Articles