diff --git a/gdk/gdk.c b/gdk/gdk.c index 953079cdd5..a0938af58a 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -173,7 +173,7 @@ stash_desktop_startup_notification_id (void) if (!g_utf8_validate (desktop_startup_id, -1, NULL)) g_warning ("DESKTOP_STARTUP_ID contains invalid UTF-8"); else - startup_notification_id = g_strdup (desktop_startup_id ? desktop_startup_id : ""); + startup_notification_id = g_strdup (desktop_startup_id); } /* Clear the environment variable so it won't be inherited by diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index b58371e702..2d2318f3d7 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.c @@ -1383,7 +1383,7 @@ gdk_x11_keymap_translate_keyboard_state (GdkKeymap *keymap, tmp_keyval = translate_keysym (keymap_x11, hardware_keycode, group, state, - level, effective_group); + effective_group, level); } if (consumed_modifiers) diff --git a/gsk/vulkan/gskvulkanimage.c b/gsk/vulkan/gskvulkanimage.c index 64e780bb7f..b73578afde 100644 --- a/gsk/vulkan/gskvulkanimage.c +++ b/gsk/vulkan/gskvulkanimage.c @@ -718,7 +718,7 @@ gsk_vulkan_image_upload_regions (GskVulkanImage *self, } else { - for (gsize r = 0; r < regions[i].height; i++) + for (gsize r = 0; r < regions[i].height; r++) memcpy (m + r * regions[i].width * 4, regions[i].data + r * regions[i].stride, regions[i].width * 4); } diff --git a/gtk/a11y/gtkatspiaction.c b/gtk/a11y/gtkatspiaction.c index fb39abf8d5..d31cda147b 100644 --- a/gtk/a11y/gtkatspiaction.c +++ b/gtk/a11y/gtkatspiaction.c @@ -68,10 +68,8 @@ action_handle_method (GtkAtSpiContext *self, g_variant_get (parameters, "(i)", &idx); - const Action *action = &actions[idx]; - if (idx >= 0 && idx < n_actions) - g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", action->name)); + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", actions[idx].name)); else g_dbus_method_invocation_return_error (invocation, G_IO_ERROR, @@ -129,10 +127,8 @@ action_handle_method (GtkAtSpiContext *self, g_variant_get (parameters, "(i)", &idx); - const Action *action = &actions[idx]; - if (idx >= 0 && idx < n_actions) - g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", action->keybinding)); + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", actions[idx].keybinding)); else g_dbus_method_invocation_return_error (invocation, G_IO_ERROR, diff --git a/gtk/gtkcomposetable.c b/gtk/gtkcomposetable.c index a07f5da06f..c5261f8a63 100644 --- a/gtk/gtkcomposetable.c +++ b/gtk/gtkcomposetable.c @@ -1038,7 +1038,7 @@ gtk_compose_table_compact_check (const GtkComposeTableCompact *table, if (!seq_index) return FALSE; - if (seq_index && n_compose == 1) + if (n_compose == 1) return TRUE; seq = NULL; diff --git a/gtk/gtkcssbordervalue.c b/gtk/gtkcssbordervalue.c index 7e5c32b86b..a9b9ef0001 100644 --- a/gtk/gtkcssbordervalue.c +++ b/gtk/gtkcssbordervalue.c @@ -218,7 +218,7 @@ _gtk_css_border_value_parse (GtkCssParser *parser, } result->is_computed = TRUE; - for (; i < 4; i++) + for (i = 0; i < 4; i++) if (result->values[i] && !gtk_css_value_is_computed (result->values[i])) { result->is_computed = FALSE; diff --git a/gtk/gtkcssselector.c b/gtk/gtkcssselector.c index f04a6fe7c5..951fbd1060 100644 --- a/gtk/gtkcssselector.c +++ b/gtk/gtkcssselector.c @@ -1073,11 +1073,8 @@ parse_n_plus_b (GtkCssParser *parser, *a = 0; return TRUE; } - - gtk_css_parser_error_syntax (parser, "Not a valid an+b type"); - return FALSE; } - + static gboolean parse_a_n_plus_b (GtkCssParser *parser, int seen_sign, diff --git a/gtk/gtklistbase.c b/gtk/gtklistbase.c index 53bf995c77..41e25858f5 100644 --- a/gtk/gtklistbase.c +++ b/gtk/gtklistbase.c @@ -1147,7 +1147,7 @@ gtk_list_base_class_init (GtkListBaseClass *klass) P_("The orientation of the orientable"), GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL, - G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_EXPLICIT_NOTIFY); + G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); g_object_class_install_properties (gobject_class, N_PROPS, properties); diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index faa100354e..af61f8cb55 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -454,8 +454,6 @@ gtk_message_dialog_init (GtkMessageDialog *dialog) GtkSettings *settings; gboolean use_caret; - priv->has_primary_markup = FALSE; - priv->has_secondary_text = FALSE; priv->has_primary_markup = FALSE; priv->has_secondary_text = FALSE; priv->message_type = GTK_MESSAGE_OTHER; diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 3714b6a7e3..5f87ae70ad 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -257,8 +257,8 @@ static void gtk_text_btree_rebalance (GtkTextBTree static GtkTextLine * get_last_line (GtkTextBTree *tree); static void post_insert_fixup (GtkTextBTree *tree, GtkTextLine *insert_line, - int char_count_delta, - int line_count_delta); + int line_count_delta, + int char_count_delta); static void gtk_text_btree_node_adjust_toggle_count (GtkTextBTreeNode *node, GtkTextTagInfo *info, int adjust); diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index a72c6ea476..4d686c744f 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -3285,9 +3285,6 @@ gtk_tree_model_filter_iter_children (GtkTreeModel *model, return TRUE; } - - iter->stamp = 0; - return FALSE; } static gboolean