WARN54-Set before passed as out parameter

Top  Previous  Next

 

Set before passed as out parameter (WARN54)

 

This section reports locations in your code where a variable is set and then passed as an "out" parameter to a function.

 

Because the "out" parameter will be set in the called function without being read first, it is at least pointless to set it before it is passed. It may also indicate some misunderstanding about the code.

 

It is recommended to check if it is meaningful to set the variable before passing it. If not, remove the assignment, or else modify the signature of the called function from "out" to "var".

 

 

Example:

 

clipx172

 

 

See also:

 

Alerts