mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Merge branch 'static-analysis-fixes' into 'master'
label: Remove a dead assignment See merge request GNOME/gtk!3972
This commit is contained in:
commit
7f2cb1138a
@ -270,7 +270,6 @@ gtk_im_context_simple_init_compose_table (void)
|
||||
const char *locale;
|
||||
char **langs = NULL;
|
||||
char **lang = NULL;
|
||||
gboolean added;
|
||||
const char * const sys_langs[] = { "el_gr", "fi_fi", "pt_br", NULL };
|
||||
const char * const *sys_lang = NULL;
|
||||
char *x11_compose_file_dir = get_x11_compose_file_dir ();
|
||||
@ -278,10 +277,11 @@ gtk_im_context_simple_init_compose_table (void)
|
||||
path = g_build_filename (g_get_user_config_dir (), "gtk-4.0", "Compose", NULL);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
||||
{
|
||||
added = add_compose_table_from_file (path);
|
||||
g_free (path);
|
||||
if (added)
|
||||
return;
|
||||
if (add_compose_table_from_file (path))
|
||||
{
|
||||
g_free (path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
g_clear_pointer (&path, g_free);
|
||||
|
||||
@ -292,10 +292,11 @@ gtk_im_context_simple_init_compose_table (void)
|
||||
path = g_build_filename (home, ".XCompose", NULL);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
||||
{
|
||||
added = add_compose_table_from_file (path);
|
||||
g_free (path);
|
||||
if (added)
|
||||
return;
|
||||
if (add_compose_table_from_file (path))
|
||||
{
|
||||
g_free (path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
g_clear_pointer (&path, g_free);
|
||||
|
||||
@ -336,13 +337,13 @@ gtk_im_context_simple_init_compose_table (void)
|
||||
g_free (x11_compose_file_dir);
|
||||
g_strfreev (langs);
|
||||
|
||||
if (path != NULL)
|
||||
if (path != NULL &&
|
||||
add_compose_table_from_file (path))
|
||||
{
|
||||
added = add_compose_table_from_file (path);
|
||||
g_free (path);
|
||||
return;
|
||||
}
|
||||
if (added)
|
||||
return;
|
||||
g_clear_pointer (&path, g_free);
|
||||
|
||||
add_builtin_compose_table ();
|
||||
}
|
||||
|
@ -3977,7 +3977,6 @@ gtk_label_ensure_layout (GtkLabel *self)
|
||||
if (self->layout)
|
||||
return;
|
||||
|
||||
align = PANGO_ALIGN_LEFT; /* Quiet gcc */
|
||||
rtl = _gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL;
|
||||
self->layout = gtk_widget_create_pango_layout (GTK_WIDGET (self), self->text);
|
||||
|
||||
|
@ -443,6 +443,7 @@ gtk_list_item_manager_release_items (GtkListItemManager *self,
|
||||
i = position - i;
|
||||
while (i < position + query_n_items)
|
||||
{
|
||||
g_assert (item != NULL);
|
||||
if (item->widget)
|
||||
{
|
||||
g_queue_push_tail (released, item->widget);
|
||||
@ -459,7 +460,7 @@ gtk_list_item_manager_release_items (GtkListItemManager *self,
|
||||
g_assert_not_reached ();
|
||||
item = gtk_rb_tree_node_get_next (next);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
item = next;
|
||||
}
|
||||
@ -511,6 +512,7 @@ gtk_list_item_manager_ensure_items (GtkListItemManager *self,
|
||||
|
||||
if (offset > 0)
|
||||
{
|
||||
g_assert (item != NULL);
|
||||
new_item = gtk_rb_tree_insert_before (self->items, item);
|
||||
new_item->n_items = offset;
|
||||
item->n_items -= offset;
|
||||
@ -519,6 +521,7 @@ gtk_list_item_manager_ensure_items (GtkListItemManager *self,
|
||||
|
||||
for (i = 0; i < query_n_items; i++)
|
||||
{
|
||||
g_assert (item != NULL);
|
||||
if (item->n_items > 1)
|
||||
{
|
||||
new_item = gtk_rb_tree_insert_before (self->items, item);
|
||||
|
@ -7705,7 +7705,6 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
||||
|
||||
decoration_line = _gtk_css_text_decoration_line_value_get (style->font_variant->text_decoration_line);
|
||||
decoration_style = _gtk_css_text_decoration_style_value_get (style->font_variant->text_decoration_style);
|
||||
color = gtk_css_color_value_get_rgba (style->core->color);
|
||||
decoration_color = gtk_css_color_value_get_rgba (style->font_variant->text_decoration_color
|
||||
? style->font_variant->text_decoration_color
|
||||
: style->core->color);
|
||||
|
Loading…
Reference in New Issue
Block a user