Kbase P137640: Migrated to OpenEdge 10.2A or later, when compiling code the 15090 warning is being generated
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/04/2011 |
|
Status: Verified
SYMPTOM(s):
Migrated to OpenEdge 10.2A or later, when compiling code the 15090 warning is being generated
Warning 15090 occurs when compiling code
WARNING: Executable statement at line <line-num> of file <file-name> will not be reached. (15090)
Recompiled application
The recompilation process is reporting many instances of error (warning) 15090
FACT(s) (Environment):
OpenEdge 10.2A
All Supported Operating Systems
CHANGE:
Migrated to OpenEdge 10.2A
CAUSE:
This is expected behavior. The 15090 warning was added in OpenEdge 10.2A. The compiler was enhanced to add "dead code" detection. When warning 15090 occurs, it is noting that the code indicated will never be executed and should be reviewed. For example, the following code would generate the 15090 warning as the second MESSAGE statement will never be reached because of the RETURN statement.
MESSAGE '1' VIEW-AS ALERT-BOX.
RETURN.
MESSAGE '2' VIEW-AS ALERT-BOX.
FIX:
Option #1
Review the code, and remove the "dead code" where possible.
When the warning is triggered using conditional preprocessor directives (&IF. &ELSEIF, &ENDIF) , move the code for which the warning is raised in a final &ELSE before the &ENDIF.
Example:
&SCOPED-DEFINE causewarning YES
MESSAGE '1' VIEW-AS ALERT-BOX.
&IF DEFINED(causewarning) = 3 &THEN
RETURN.
&ENDIF
MESSAGE '2' VIEW-AS ALERT-BOX.
Would become:
&SCOPED-DEFINE causewarning YES
MESSAGE '1' VIEW-AS ALERT-BOX.
&IF DEFINED(causewarning) = 3 &THEN
RETURN.
&ELSE
MESSAGE '2' VIEW-AS ALERT-BOX.
&ENDIF
Option #2
Suppress the warning message by executing the following statement in the program that compiles/executes the problematic code:
SESSION:SUPPRESS-WARNINGS = TRUE.
Option #2.5 (available starting from Openedge 10.2B03)
Starting from OpenEdge 10.2B03, it's possible to suppress specific warnings only using. To suppress only the warning 15090, use the statement:
SESSION:SUPPRESS-WARNINGS-LIST = "15090".