Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-3432

workgen needs braces around an "if" body

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.11, WT3.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage 2017-07-31

      I think clang 4.0 has found a real bug here:

      ../../../bench/workgen/workgen.cxx: In member function ‘void workgen::Operation::describe(std::ostream&) const’:
      ../../../bench/workgen/workgen.cxx:928:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
           if (_transaction != NULL)
           ^~
      ../../../bench/workgen/workgen.cxx:929:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
               os << ", ["; _transaction->describe(os); os << "]";
                            ^~~~~~~~~~~~
      

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: