/w — Set Warning Level Option (JVC)

Syntax

/w0

/w1

/w2

/w3

/w4

/wx

These options control the output of warning messages produced by the compiler. The compiler determines which warnings to display based upon their severity. They affect only source files named on the command line.

Compiler warning message numbers begin with J5. The documentation describes the warnings, indicates each warning’s level, and indicates potential problems (rather than actual coding errors) with statements that may not compile as you intend.

The meaning of these options is as follows:

Option Description
/w0 Turns off all warning messages.
/w1 Displays severe warning messages.
/w2 Displays a less severe level of warning message than /w1. This is the default warning level setting.
/w3 Displays a less severe level of warning than /w2, including use of methods with no declared return type, failure to put return statements in methods with non-void return types, and data conversions that would cause loss of data or precision.
/w4 Displays the least severe level of warning messages.
/wx Forces warnings to errors. Any warning will cause the compiler to emit an error and fail the compilation. This option can be combined with one of the warning level options above.