Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMaksim Andrianov <maksimandrianov1@gmail.com>2018-06-25 17:57:42 +0300
committerMaksim Andrianov <maksimandrianov1@gmail.com>2018-06-25 17:57:42 +0300
commit1c9ae86fe0d701af12fcb8c9548bd870ba61f4fa (patch)
tree049d067833e9f4d40ca8793e7b020601b69fdfea /base
parent036be1ebad980f832fd01ba42b5a7c2ca16d8f1e (diff)
After merge
Diffstat (limited to 'base')
-rw-r--r--base/assert.hpp7
-rw-r--r--base/base_tests/levenshtein_dfa_test.cpp2
2 files changed, 9 insertions, 0 deletions
diff --git a/base/assert.hpp b/base/assert.hpp
index 16c78dc89e..abbd8b01b9 100644
--- a/base/assert.hpp
+++ b/base/assert.hpp
@@ -91,3 +91,10 @@ namespace my
#define ASSERT_GREATER(X, Y, msg)
#define ASSERT_GREATER_OR_EQUAL(X, Y, msg)
#endif
+
+// The macro that causes the warning to be ignored: control reaches end of
+// non-void function.
+#define INCORRECT_VALUE_IN_THE_SWITCH() do { \
+ CHECK(false, ("Incorrect value in the switch statment")); \
+ std::abort(); \
+} while(false)
diff --git a/base/base_tests/levenshtein_dfa_test.cpp b/base/base_tests/levenshtein_dfa_test.cpp
index 2d7cab01b1..2c27c0ea3b 100644
--- a/base/base_tests/levenshtein_dfa_test.cpp
+++ b/base/base_tests/levenshtein_dfa_test.cpp
@@ -42,6 +42,8 @@ string DebugPrint(Status status)
case Status::Rejects: return "Rejects";
case Status::Intermediate: return "Intermediate";
}
+
+ INCORRECT_VALUE_IN_THE_SWITCH();
}
string DebugPrint(Result const & result)