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

workgen needs braces around an "if" body

    XMLWordPrintable

    Details

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

      Description

      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 << "]";
                            ^~~~~~~~~~~~
      

        Attachments

          Activity

            People

            Assignee:
            donald.anderson Donald Anderson
            Reporter:
            michael.cahill Michael Cahill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: