Uploaded image for project: 'SonarCOBOL'
  1. SonarCOBOL
  2. SONARCOBOL-1278

False Positive AlwaysTrueOrFalseCondition (S2583): cover INVOKE statement in IBM Enterprise Cobol

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: Rules
    • Labels:
      None

      Description

      RSPEC-2583
      INVOKE statement might change the value of returning variable.

             ID DIVISION.
             DATA DIVISION.
             WORKING-STORAGE SECTION.
               01 NUM99 PIC 99.
             PROCEDURE DIVISION.
             IF NUM99 = 0
               INVOKE jRectangle "getArea" RETURNING NUM99
               IF NUM99 = 0 THEN display "..." END-IF    *> FP is here
             END-IF.
      

      Note that INVOKE statement is covered only in IBM Enterprise and Microfocus (see the ticket COBOL-1268).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elena.vilchik Elena Vilchik
                Reporter:
                elena.vilchik Elena Vilchik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: