summaryrefslogtreecommitdiff
path: root/gtk/gtkmenutracker.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-05-30 21:27:45 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-06-02 09:08:15 -0400
commita0dddbbafae2d99fa0d4672d8582414b3a186e1a (patch)
treef0e1ee72d8257062ccdf62924dd6500c986b088c /gtk/gtkmenutracker.c
parent9545c017644b0e3de37b2479fbecd78cc0950a91 (diff)
downloadgtk+-a0dddbbafae2d99fa0d4672d8582414b3a186e1a.tar.gz
menu: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
Diffstat (limited to 'gtk/gtkmenutracker.c')
-rw-r--r--gtk/gtkmenutracker.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gtk/gtkmenutracker.c b/gtk/gtkmenutracker.c
index c7125b77bc..2d39319875 100644
--- a/gtk/gtkmenutracker.c
+++ b/gtk/gtkmenutracker.c
@@ -178,15 +178,15 @@ gtk_menu_tracker_section_sync_separators (GtkMenuTrackerSection *section,
if (subsection)
{
- gboolean could_have_separator;
+ gboolean separator;
- could_have_separator = (section->with_separators && n_items > 0) || subsection->separator_label;
+ separator = (section->with_separators && n_items > 0) || subsection->separator_label;
/* Only pass the parent_model and parent_index in case they may be used to create the separator. */
n_items += gtk_menu_tracker_section_sync_separators (subsection, tracker, offset + n_items,
- could_have_separator,
- could_have_separator ? section->model : NULL,
- could_have_separator ? i : 0);
+ separator,
+ separator ? section->model : NULL,
+ separator ? i : 0);
}
else
n_items++;
@@ -199,11 +199,11 @@ gtk_menu_tracker_section_sync_separators (GtkMenuTrackerSection *section,
if (should_have_separator > section->has_separator)
{
/* Add a separator */
- GtkMenuTrackerItem *item;
+ GtkMenuTrackerItem *separator;
- item = _gtk_menu_tracker_item_new (tracker->observable, parent_model, parent_index, FALSE, NULL, TRUE);
- (* tracker->insert_func) (item, offset, tracker->user_data);
- g_object_unref (item);
+ separator = _gtk_menu_tracker_item_new (tracker->observable, parent_model, parent_index, FALSE, NULL, TRUE);
+ (* tracker->insert_func) (separator, offset, tracker->user_data);
+ g_object_unref (separator);
section->has_separator = TRUE;
}