Uploaded image for project: 'Z-Push'
  1. Z-Push
  2. ZP-1426

Logically dead code (DEADCODE)

    Details

    • Type: Bug
    • Status: QA
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.4.3 beta 1, 2.4.3
    • Component/s: None
    • Labels:
      None

      Description

      Found by coverity.

      class.recurrence.php lines 887, 900.

      assignment: Assigning: $limit = 0.
       887            $limit = 0;
      ...
      possible_types: At condition $limit == true, the type of $limit must be Integer.
          	const: At condition $limit == true, the value of $limit must be equal to 0.
          	truth: At condition $limit == true, the truth value of $limit must be false.
          	dead_error_condition: The condition $limit == true cannot be true.
          	
      CID 278723 (#1 of 1): Logically dead code (DEADCODE)
      dead_error_line: Execution cannot reach the expression count($items) == $limit inside this statement: if ($limit == true && count....
       900                if($limit && (count($items) == $limit))
      

      https://scan4.coverity.com/reports.htm#v37557/p14761/fileInstanceId=42305126&defectInstanceId=7831375&mergedDefectId=278723&eventId=7831375-5

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Manfred Manfred Kutas
                Reporter:
                Manfred Manfred Kutas
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: