From a2b99084b446cd9dd239b3d08ef22d2dd51a3f6e Mon Sep 17 00:00:00 2001 From: jonathan-conder-sm <63538679+jonathan-conder-sm@users.noreply.github.com> Date: Tue, 23 Nov 2021 10:37:36 +1300 Subject: [PATCH] Fix flexbuffers clang-analyzer warning (#6947) --- include/flatbuffers/flexbuffers.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/flatbuffers/flexbuffers.h b/include/flatbuffers/flexbuffers.h index 90fbc3a09..9662a6090 100644 --- a/include/flatbuffers/flexbuffers.h +++ b/include/flatbuffers/flexbuffers.h @@ -851,6 +851,7 @@ inline Reference Map::operator[](const char *key) const { case 2: comp = KeyCompare; break; case 4: comp = KeyCompare; break; case 8: comp = KeyCompare; break; + default: FLATBUFFERS_ASSERT(false); return Reference(); } auto res = std::bsearch(key, keys.data_, keys.size(), keys.byte_width_, comp); if (!res) return Reference(nullptr, 1, NullPackedType());