Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30125

Coverity analysis defect 76571: Nesting level does not match indentation

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • Labels:
    • Fully Compatible
    • ALL

      The indentation of this code suggests it is nested when it is not.

      Defect 76571 (STATIC_C)
      Checker NESTING_INDENT_MISMATCH (subcategory none)
      File: /src/mongo/db/repl/oplog.cpp
      Function mongo::repl::truncateOplogTo(mongo::OperationContext *, mongo::Timestamp)
      /src/mongo/db/repl/oplog.cpp, line: 333
      The indentation of this "else" clause to column 17 suggests that it was intended to go with the "if" statement indicated by the "intended_if" event, but it actually goes with the "if" indicated by the "actual_if" event because that "if" does not have any other "else" clause.
      /src/mongo/db/repl/oplog.cpp, line: 332
      The indentation of the "else" clause indicated by the "dangling_else" event suggests it was intended to go with this "if" statement.
      /src/mongo/db/repl/oplog.cpp, line: 333
      The "else" clause indicated by the "dangling_else" event actually goes with this "if" statement, contrary to what its indentation suggests.

            Assignee:
            asya.kamsky@mongodb.com Asya Kamsky
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: