C++17 compatibility: make WITH_TIDY=1 happy again.
Bug: http://b/111067277
Test: builds
Change-Id: I8b69ea3815e14bb6eb27f40c0dd01a85b340a355
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index 6479283..7240357 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -168,11 +168,11 @@
}
case LockWord::kUnlocked: {
LOG(FATAL) << "Inflating unlocked lock word";
- break;
+ UNREACHABLE();
}
default: {
LOG(FATAL) << "Invalid monitor state " << lw.GetState();
- return false;
+ UNREACHABLE();
}
}
LockWord fat(this, lw.GCState());
@@ -1236,7 +1236,7 @@
}
default: {
LOG(FATAL) << "Invalid monitor state " << lock_word.GetState();
- return false;
+ UNREACHABLE();
}
}
}
@@ -1280,7 +1280,7 @@
case LockWord::kFatLocked: // Unreachable given the loop condition above. Fall-through.
default: {
LOG(FATAL) << "Invalid monitor state " << lock_word.GetState();
- return;
+ UNREACHABLE();
}
}
}
@@ -1320,7 +1320,7 @@
}
default: {
LOG(FATAL) << "Invalid monitor state " << lock_word.GetState();
- return;
+ UNREACHABLE();
}
}
}