Warnings give the programmer information about possible errors in Qore code.

Warnings can be enabled using the {\ttfamily -\/W} command-\/line option (see \mbox{\hyperlink{command_line_processing}{qore Executable Command-\/\+Line Processing}} for more information) or by using the \mbox{\hyperlink{parse_directives_enable-all-warnings}{\%enable-\/all-\/warnings}} or \mbox{\hyperlink{parse_directives_enable-warning}{\%enable-\/warning}} parse directives.

\begin{DoxyParagraph}{Command Line Example}
\begin{DoxyVerb}prompt$ qore -wdeprecated -wduplicate-hash-key script.q\end{DoxyVerb}

\end{DoxyParagraph}
\begin{DoxyParagraph}{Qore Code Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{\%enable-warning deprecated}
\DoxyCodeLine{\%enable-warning duplicate-hash-key}
\DoxyCodeLine{\%disable-warning excess-args}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyParagraph}{List of All Warnings}

\begin{DoxyItemize}
\item \mbox{\hyperlink{warnings_warning-broken-logic-precedence}{broken-\/logic-\/precedence}} broken-\/logic-\/precedence
\item \mbox{\hyperlink{warnings_call-with-type-errors}{call-\/with-\/type-\/errors}}
\item \mbox{\hyperlink{warnings_deprecated-warning}{deprecated}}
\item \mbox{\hyperlink{warnings_duplicate-block-vars}{duplicate-\/block-\/vars}}
\item \mbox{\hyperlink{warnings_duplicate-global-vars}{duplicate-\/global-\/vars}}
\item \mbox{\hyperlink{warnings_duplicate-hash-key}{duplicate-\/hash-\/key}}
\item \mbox{\hyperlink{warnings_duplicate-local-vars}{duplicate-\/local-\/vars}}
\item \mbox{\hyperlink{warnings_excess-args}{excess-\/args}}
\item \mbox{\hyperlink{warnings_invalid-operation}{invalid-\/operation}}
\item \mbox{\hyperlink{warnings_module-only}{module-\/only}}
\item \mbox{\hyperlink{warnings_non-existent-method-call}{non-\/existent-\/method-\/call}}
\item \mbox{\hyperlink{warnings_return-value-ignored}{return-\/value-\/ignored}}
\item \mbox{\hyperlink{warnings_undeclared-var}{undeclared-\/var}}
\item \mbox{\hyperlink{warnings_unknown-warning}{unknown-\/warning}}
\item \mbox{\hyperlink{warnings_unreachable-code}{unreachable-\/code}}
\item \mbox{\hyperlink{warnings_unreferenced-variable}{unreferenced-\/variable}}
\item \mbox{\hyperlink{warnings_warning-mask-unchanged}{warning-\/mask-\/unchanged}}
\end{DoxyItemize}
\end{DoxyParagraph}


 \hypertarget{warnings_warning-broken-logic-precedence}{}\section{broken-\/logic-\/precedence}\label{warnings_warning-broken-logic-precedence}
Only available with \mbox{\hyperlink{parse_directives_broken-logic-precedence}{\%broken-\/logic-\/precedence}} parse define. Raised when the parser determins that meaning of an expression is affected by the \mbox{\hyperlink{parse_directives_broken-logic-precedence}{\%broken-\/logic-\/precedence}} parse define.

\begin{DoxySince}{Since}
Qore 0.\+8.\+12.\+11
\end{DoxySince}


 \hypertarget{warnings_call-with-type-errors}{}\section{call-\/with-\/type-\/errors}\label{warnings_call-with-type-errors}
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 \begin{DoxySince}{Since}
Qore 0.\+8.\+0
\end{DoxySince}


 \hypertarget{warnings_deprecated-warning}{}\section{deprecated}\label{warnings_deprecated-warning}
Raised when deprecated functionality is accessed. \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{deprecated}{Deprecated List}} 
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+0
\end{DoxySince}


 \hypertarget{warnings_duplicate-block-vars}{}\section{duplicate-\/block-\/vars}\label{warnings_duplicate-block-vars}
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 \mbox{\hyperlink{parse_directives_assume-local}{\%assume-\/local}} or \mbox{\hyperlink{parse_directives_new-style}{\%new-\/style}} parse options are set \begin{DoxySince}{Since}
Qore 0.\+8.\+2
\end{DoxySince}


 \hypertarget{warnings_duplicate-global-vars}{}\section{duplicate-\/global-\/vars}\label{warnings_duplicate-global-vars}
Raised when a program declares a global variable more than once \begin{DoxySince}{Since}
Qore 0.\+5.\+2
\end{DoxySince}


 \hypertarget{warnings_duplicate-hash-key}{}\section{duplicate-\/hash-\/key}\label{warnings_duplicate-hash-key}
Raised when an immediate hash is declared and at least one of the keys is repeated \begin{DoxySince}{Since}
Qore 0.\+8.\+0
\end{DoxySince}


 \hypertarget{warnings_duplicate-local-vars}{}\section{duplicate-\/local-\/vars}\label{warnings_duplicate-local-vars}
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 \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{warnings_duplicate-block-vars}{duplicate-\/block-\/vars}} 
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+5.\+2
\end{DoxySince}


 \hypertarget{warnings_excess-args}{}\section{excess-\/args}\label{warnings_excess-args}
Raised when a function or method call is made with more arguments than are used by the function or method \begin{DoxySince}{Since}
Qore 0.\+8.\+0
\end{DoxySince}


 \hypertarget{warnings_invalid-operation}{}\section{invalid-\/operation}\label{warnings_invalid-operation}
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 \begin{DoxySince}{Since}
Qore 0.\+8.\+0
\end{DoxySince}


 \hypertarget{warnings_module-only}{}\section{module-\/only}\label{warnings_module-only}
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 \mbox{\hyperlink{qore_modules_mod_public}{The \char`\"{}public\char`\"{} Keyword}} \begin{DoxySince}{Since}
Qore 0.\+8.\+4
\end{DoxySince}


 \hypertarget{warnings_non-existent-method-call}{}\section{non-\/existent-\/method-\/call}\label{warnings_non-existent-method-call}
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 \mbox{\hyperlink{operators_cast}{cast$<$$>$() operator}} to avoid this warning \begin{DoxySince}{Since}
Qore 0.\+8.\+0
\end{DoxySince}


 \hypertarget{warnings_return-value-ignored}{}\section{return-\/value-\/ignored}\label{warnings_return-value-ignored}
Raised when a function or method call is made with no side effects and the return value is ignored \begin{DoxySince}{Since}
Qore 0.\+8.\+0
\end{DoxySince}


 \hypertarget{warnings_undeclared-var}{}\section{undeclared-\/var}\label{warnings_undeclared-var}
This warning is raised when a program uses a variable that has not been declared with \mbox{\hyperlink{variables_my}{my}} or \mbox{\hyperlink{variables_our}{our}} \begin{DoxySince}{Since}
Qore 0.\+5.\+2
\end{DoxySince}


 \hypertarget{warnings_unknown-warning}{}\section{unknown-\/warning}\label{warnings_unknown-warning}
This warning is raised when a program tries to enable or disable an unknown warning \begin{DoxySince}{Since}
Qore 0.\+5.\+2
\end{DoxySince}


 \hypertarget{warnings_unreachable-code}{}\section{unreachable-\/code}\label{warnings_unreachable-code}
Raised when code is defined that can never be executed (for example, code following a \mbox{\hyperlink{statements_return}{return}} or \mbox{\hyperlink{statements_thread_exit}{thread\+\_\+exit statement}}) \begin{DoxySince}{Since}
Qore 0.\+5.\+2
\end{DoxySince}


 \hypertarget{warnings_unreferenced-variable}{}\section{unreferenced-\/variable}\label{warnings_unreferenced-variable}
Raised when a variable is declared but never referenecd \begin{DoxySince}{Since}
Qore 0.\+8.\+2
\end{DoxySince}


 \hypertarget{warnings_warning-mask-unchanged}{}\section{warning-\/mask-\/unchanged}\label{warnings_warning-mask-unchanged}
This warning is raised when a program tries to change the warning mask with parse options, but the warnings are locked \begin{DoxySince}{Since}
Qore 0.\+5.\+2 
\end{DoxySince}
