From dc8107e6c0aa989f1661035ccc51344aad1d24a1 Mon Sep 17 00:00:00 2001
From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com>
Date: Fri, 12 Aug 2005 15:54:28 +0000
Subject: [PATCH] Replace g_assert with g_return_val_if_reached to make gcc
happy
---
moo.kdevelop | 40 ++++++++++++++++++-------------------
moo/mooterm/mooterm-text.c | 4 ++--
moo/mooterm/mootermparser.c | 5 ++---
3 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/moo.kdevelop b/moo.kdevelop
index 589b836e..46f8d3bb 100644
--- a/moo.kdevelop
+++ b/moo.kdevelop
@@ -24,7 +24,7 @@
.
false
-
+
C
@@ -33,7 +33,7 @@
moo/libmoo.la
- debug
+ optimized
tests/testfileview
@@ -63,21 +63,21 @@
- --enable-all-gcc-warnings=fatal --enable-developer-mode
+ --enable-all-gcc-warnings=fatal --enable-developer-mode --without-mooapp --without-mooterm --without-python
build/optimized
kdevgccoptions
kdevgppoptions
- kdevpgf77options
+ kdevg77options
-O3 -g0
-O3 -g0
-
-
-
-
-
-
-
+
+
+
+
+
+
+
--enable-all-gcc-warnings=fatal
@@ -166,10 +166,10 @@
libtool
--g-fatal-warnings --sync
-
-
-
-
+
+
+
+
true
false
true
@@ -234,16 +234,16 @@
-
+
A new empty GAP source file
-
+
A new empty C++ file.
-
+
A new empty header file for C/C++.
-
+
A new empty C file.
@@ -270,7 +270,7 @@
-
+
set
m_,_
theValue
diff --git a/moo/mooterm/mooterm-text.c b/moo/mooterm/mooterm-text.c
index 9f25ff21..94ac7d24 100644
--- a/moo/mooterm/mooterm-text.c
+++ b/moo/mooterm/mooterm-text.c
@@ -196,7 +196,7 @@ static int segment_sym_diff (Segment *s1, Segment *s2,
}
}
- g_assert_not_reached ();
+ g_return_val_if_reached (0);
}
@@ -740,7 +740,7 @@ static gboolean extend_selection (MooText *obj,
return iter_cmp (start, end);
}
- g_assert_not_reached ();
+ g_return_val_if_reached (FALSE);
}
diff --git a/moo/mooterm/mootermparser.c b/moo/mooterm/mootermparser.c
index e39a7ed7..3e5173a7 100644
--- a/moo/mooterm/mootermparser.c
+++ b/moo/mooterm/mootermparser.c
@@ -1032,10 +1032,9 @@ int _moo_term_yylex (MooTermParser *parser)
case PART_DONE:
return 0;
}
-
- default:
- g_assert_not_reached ();
}
+
+ g_return_val_if_reached (0);
}