summaryrefslogtreecommitdiff
path: root/girepository/girwriter.c
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 17:13:16 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 18:57:03 +0200
commit9535fc481f28fa661fa9d48b932e089aa3504bc3 (patch)
tree1fe0475b815e59ac637d284ffdb70d34c38550b9 /girepository/girwriter.c
parente552057558ac4c02b9bba922ee2f06d2f9b0d57d (diff)
downloadgobject-introspection-9535fc481f28fa661fa9d48b932e089aa3504bc3.tar.gz
build: enable -Wswitch-default
In case the surrounding code handles missing cases break, otherwise add a g_assert_not_reached(). The generated parser code triggers this as well, so disable it there only.
Diffstat (limited to 'girepository/girwriter.c')
-rw-r--r--girepository/girwriter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/girepository/girwriter.c b/girepository/girwriter.c
index bb82a46f..7b255423 100644
--- a/girepository/girwriter.c
+++ b/girepository/girwriter.c
@@ -505,6 +505,8 @@ write_callable_info (const gchar *namespace,
case GI_DIRECTION_INOUT:
xml_printf (file, " direction=\"inout\"");
break;
+ default:
+ g_assert_not_reached ();
}
if (g_arg_info_may_be_null (arg))
@@ -529,6 +531,8 @@ write_callable_info (const gchar *namespace,
case GI_SCOPE_TYPE_NOTIFIED:
xml_printf (file, " scope=\"notified\"");
break;
+ default:
+ g_assert_not_reached ();
}
if (g_arg_info_get_closure (arg) >= 0)