noeffect

statement has no effect

Rule "noeffect" gives this warning when it finds a statement which does
nothing. For example, these are a valid statements, but they do nothing:

     
     1 + 1.
     hEditor:READ-ONLY.

These statements compile and run fine, but nothing happens. They probably don't do what the programmer intended to do, so they are probably errors.

Less obvious, and more likely to cause problems, is the following statement.
The programmer might have expected the EQ to do an assignment,
but in fact, EQ only does a comparison. This statement does
nothing other than an equality comparison between i and 12:

     i eq 12.

Known issue: methods without brackets:

Progress allows to discard brackets on method calls when there are no parameters, for example:

     hTT:CREATE-BUFFER 

instead

     hTT:CREATE-BUFFER() 

The first form will raise the "Statement has no effect" warning although the statement does have effect.
The reason is that Prolint has to assume that :CREATE-BUFFER is an attribute instead of a method, simply because it doesn't see brackets.

Rule noeffect excludes warnings for the following list of methods: QUERY-OPEN,GET-NEXT,GET-FIRST,GET-PREV,GET-lAST,CLOSE-QUERY. The reason why they are excluded is that these methods are very commonly used without brackets, the enormous number of warnings from these methods obscure the more important warnings with real bug potential. To compensate for excluding these methods from "noeffect", there is another rule "nobrackets" which reports these methods only.

the risc:

The source does nothing, and is probably an programming error.

how to solve this:

Don't use statements that have no effect.

Use brackets on object methods like hTT:CREATE-BUFFER().

How to suppress these warnings:

You can put directive {&_proparse_ prolint-nowarn(noeffect)} directly before
the offending statement.
See also: suppress warnings.