[SERVER-30125] Coverity analysis defect 76571: Nesting level does not match indentation Created: 13/Jul/17  Updated: 13/Jul/17  Resolved: 13/Jul/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Asya Kamsky
Resolution: Won't Fix Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Asya Kamsky [ 13/Jul/17 ]

this was a test of coverity integration

Generated at Thu Feb 08 04:22:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.