Skip to content
Snippets Groups Projects

[Clang] Fix warning about an unchecked enumerator in switch().

Merged Jö Fahlke requested to merge fix-unchecked-enum-warning into master
/home/joe/Projekte/dune-simd/dune-istl/dune/istl/matrixmarket.hh:706:18: warning: enumeration values 'general' and 'unknown_structure' not handled in switch [-Wswitch]
          switch(mmHeader.structure)
  • Move the switch(mmHeader.structure) out of the loop over the entries and and check all structure types there. This will throw immediately for unknown structure types, rather then reading all entries and then throwing.
  • Write the for() loop in a less unusual format; i.e. don't try and save on local integer variables.

Merge request reports

Pipeline #9865 passed

Pipeline passed for fa316352 on fix-unchecked-enum-warning

Approval is optional

Merged by Jö FahlkeJö Fahlke 6 years ago (Jun 21, 2018 2:37pm UTC)

Merge details

  • Changes merged into master with f31c8d93.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #9866 passed

Pipeline passed for f31c8d93 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading