Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-5009

CID 1022011 Logically dead code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 7.1.0
    • Core

    Description

      TS_INLINE char &IOBufferReader::operator[](int64_t i)
      686{
      687 static char _error = '\0';
      688 IOBufferBlock *b = block.get();
      689
      690 i += start_offset;
      cond_null: Condition b, taking false branch. Now the value of b is NULL.
      691 while (b)

      { 692 int64_t bytes = b->read_avail(); 693 if (bytes > i) 694 return b->start()[i]; 695 i -= bytes; 696 b = b->next.get(); 697 }

      698
      699 ink_assert(!"out of range");
      const: At condition !!b, the value of b must be equal to 0.
      null: At condition !!b, the value of b must be NULL.
      dead_error_condition: The condition !!b cannot be true.
      700 if (unlikely(b))

      { CID 1022011 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return b->start();. 701 return *b->start(); 702 }

      Attachments

        Issue Links

          Activity

            People

              ngara Nathan Garabedian
              ngara Nathan Garabedian
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m