Qore Programming Language Reference Manual
0.9.3.2
|
Warnings give the programmer information about possible errors in Qore code.
Warnings can be enabled using the -W
command-line option (see qore Executable Command-Line Processing for more information) or by using the %enable-all-warnings or %enable-warning parse directives.
prompt$ qore -wdeprecated -wduplicate-hash-key script.q
Only available with %broken-logic-precedence parse define. Raised when the parser determins that meaning of an expression is affected by the %broken-logic-precedence parse define.
Raised when the parser determines that the argument types of a function or method call are such that the operation is guaranteed to produce a constant value
Raised when deprecated functionality is accessed.
Raised when a program declares a local variable more than once in the same block; note that this is not a warning but rather an error when %assume-local or %new-style parse options are set
Raised when a program declares a global variable more than once
Raised when an immediate hash is declared and at least one of the keys is repeated
This warning is raised when a local variable with the same name is declared in a subblock (ie another local variable with the same name is reachable in the same lexical scope); note that this warning can raise false positives if the programmer is used to redeclaring the same variable names in subblocks
Raised when a function or method call is made with more arguments than are used by the function or method
Raised when the parser determins that the types of an operation are such that the operation is guaranteed to produce no value; this warning can only be raised when type information is available at parse time
This warning is raised when a feature that is only valid in a user module is used in code that is not in a user module, for example, declaring a class or namespace The "public" Keyword
Warning is raised when the given method cannot be found in the class at parse time; this is a warning because the object could be a subclass that has the given method implemented, in which case the call will succeed at run time. Use the cast<>() operator to avoid this warning
Raised when a function or method call is made with no side effects and the return value is ignored
This warning is raised when a program uses a variable that has not been declared with my or our
This warning is raised when a program tries to enable or disable an unknown warning
Raised when code is defined that can never be executed (for example, code following a return or thread_exit statement)
Raised when a variable is declared but never referenecd
This warning is raised when a program tries to change the warning mask with parse options, but the warnings are locked