summaryrefslogtreecommitdiff
path: root/gtksourceview
diff options
context:
space:
mode:
authorSébastien Wilmet <swilmet@gnome.org>2015-08-09 16:45:29 +0200
committerSébastien Wilmet <swilmet@gnome.org>2015-08-09 16:48:35 +0200
commit17663047e7a16a4a3f94e7a358128347875a216d (patch)
tree959ed208e696bbddf3a38d83ac5cca4a6c10963e /gtksourceview
parentfcf79895a31c957a8021fed36bf85b38f71521c7 (diff)
downloadgtksourceview-17663047e7a16a4a3f94e7a358128347875a216d.tar.gz
ContextEngine: fix compilation warnings
Diffstat (limited to 'gtksourceview')
-rw-r--r--gtksourceview/gtksourcecontextengine.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtksourceview/gtksourcecontextengine.c b/gtksourceview/gtksourcecontextengine.c
index 0e73e66b..6c72c781 100644
--- a/gtksourceview/gtksourcecontextengine.c
+++ b/gtksourceview/gtksourcecontextengine.c
@@ -3303,7 +3303,7 @@ static void
context_unref (Context *context)
{
ContextPtr *children;
- gint i;
+ guint i;
if (context == NULL || --context->ref_count != 0)
return;
@@ -5372,11 +5372,13 @@ update_syntax (GtkSourceContextEngine *ce,
if (0 == start_offset)
{
+ gunichar c;
+
first_line = TRUE;
/* If it is the first line and it starts with BOM, skip it
* since regexes in lang files do not take it into account */
- gunichar c = gtk_text_iter_get_char (&start_iter);
+ c = gtk_text_iter_get_char (&start_iter);
if (IS_BOM (c))
{
gtk_text_iter_forward_char (&start_iter);
@@ -5656,6 +5658,8 @@ context_definition_new (const gchar *id,
g_return_val_if_fail (!match, NULL);
g_return_val_if_fail (!end || start, NULL);
break;
+ default:
+ g_assert_not_reached ();
}
definition = g_slice_new0 (ContextDefinition);
@@ -5757,6 +5761,8 @@ context_definition_unref (ContextDefinition *definition)
_gtk_source_regex_unref (definition->u.start_end.start);
_gtk_source_regex_unref (definition->u.start_end.end);
break;
+ default:
+ g_assert_not_reached ();
}
sub_pattern_list = definition->sub_patterns;
@@ -5888,6 +5894,8 @@ _gtk_source_context_data_define_context (GtkSourceContextData *ctx_data,
if (match_regex != NULL)
wrong_args = TRUE;
break;
+ default:
+ g_assert_not_reached ();
}
if (wrong_args)