Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 90 2012-2013 Microchip Technology Inc.
The following -W options are not implied by -Wall. Some of them warn about construc-
tions that users generally do not consider questionable, but which occasionally you
might wish to check for. Others warn about constructions that are necessary or hard to
avoid in some cases, and there is no simple way to modify the code to suppress the
warning.
-Wuninitialized Warn if an automatic variable is used without first being
initialized.
These warnings are possible only when optimization is enabled,
because they require data flow information that is computed
only when optimizing.
These warnings occur only for variables that are candidates for
register allocation. Therefore, they do not occur for a variable
that is declared volatile, or whose address is taken, or
whose size is other than 1, 2, 4 or 8 bytes. Also, they do not
occur for structures, unions or arrays, even when they are in
registers.
Note that there may be no warning about a variable that is used
only to compute a value that itself is never used, because such
computations may be deleted by data flow analysis before the
warnings are printed.
-Wunknown-pragmas Warn when a #pragma directive is encountered which is not
understood by the compiler. If this command line option is used,
warnings will even be issued for unknown pragmas in system
header files. This is not the case if the warnings were only
enabled by the -Wall command line option.
-Wunused Warn whenever a variable is unused aside from its declaration,
whenever a function is declared static but never defined, when-
ever a label is declared but not used, and whenever a state-
ment computes a result that is explicitly not used.
In order to get a warning about an unused function parameter,
both -W and -Wunused must be specified.
Casting an expression to void suppresses this warning for an
expression. Similarly, the unused attribute suppresses this
warning for unused variables, parameters and labels.
-Wunused-function Warn whenever a static function is declared but not defined or a
non-inline static function is unused.
-Wunused-label Warn whenever a label is declared but not used. To suppress
this warning, use the unused attribute (see
Section 8.12 Variable Attributes).
-Wunused-parameter Warn whenever a function parameter is unused aside from its
declaration. To suppress this warning, use the unused attribute
(see Section 8.12 Variable Attributes).
-Wunused-variable Warn whenever a local variable or non-constant static variable
is unused aside from its declaration. To suppress this warning,
use the unused attribute (see Section 8.12 Variable Attri-
butes).
-Wunused-value Warn whenever a statement computes a result that is explicitly
not used. To suppress this warning, cast the expression to
void.
TABLE 5-8: WARNING/ERROR OPTIONS IMPLIED BY -WALL (CONTINUED)
Option Definition

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh