aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-02 17:31:55 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-02 17:31:55 +0100
commit03be83f5a444183083f895352133f04b24fcc48f (patch)
treefe557fe0de5e68c4f7ed3e39eb4f49961a556480
parent33732749d74adaf06f222236910c4126d08d3cc9 (diff)
downloadsciteco-03be83f5a444183083f895352133f04b24fcc48f.tar.gz
use g_assert_not_reached() instead of g_assert(false): works around Clang++ warnings
* Clang++ does not see that the PC will never go beyong g_assert(false), and so reports about possible unitialized variables
-rw-r--r--src/expressions.cpp2
-rw-r--r--src/search.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/expressions.cpp b/src/expressions.cpp
index f397b13..fc1e5e2 100644
--- a/src/expressions.cpp
+++ b/src/expressions.cpp
@@ -178,7 +178,7 @@ Expressions::calc(void)
break;
default:
/* shouldn't happen */
- g_assert(false);
+ g_assert_not_reached();
}
push(result);
diff --git a/src/search.cpp b/src/search.cpp
index 9519fb9..370dbfc 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -334,7 +334,7 @@ StateSearch::pattern2regexp(const gchar *&pattern,
default:
/* shouldn't happen */
- g_assert(false);
+ g_assert_not_reached();
}
next: