[Xfce4-commits] [xfce/xfce4-settings] 01/01: Fix GCC 8 builds and mirrored boolean logic

noreply at xfce.org noreply at xfce.org
Tue Jun 19 03:38:11 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       x   f   c   e   -   4   .   1   2   
   in repository xfce/xfce4-settings.

commit 3590713e599e6a82d1a6f724eed8cecfb4dbf228
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Mon Jun 18 21:38:02 2018 -0400

    Fix GCC 8 builds and mirrored boolean logic
---
 dialogs/appearance-settings/main.c                 |  6 +++---
 dialogs/display-settings/main.c                    |  6 +++---
 dialogs/keyboard-settings/xfce-keyboard-settings.c |  8 ++++----
 dialogs/mime-settings/xfce-mime-chooser.c          |  4 ++--
 dialogs/mime-settings/xfce-mime-window.c           |  2 +-
 dialogs/mouse-settings/main.c                      |  2 +-
 xfsettingsd/clipboard-manager.c                    | 10 +++++-----
 xfsettingsd/xsettings.c                            |  2 +-
 8 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/dialogs/appearance-settings/main.c b/dialogs/appearance-settings/main.c
index 78dc870..90af26c 100644
--- a/dialogs/appearance-settings/main.c
+++ b/dialogs/appearance-settings/main.c
@@ -371,7 +371,7 @@ gtkrc_get_color_scheme_for_theme (const gchar *gtkrc_filename)
         }
     }
 
-    g_slist_foreach (read_files, (GFunc) g_free, NULL);
+    g_slist_foreach (read_files, (GFunc) (void (*)(void)) g_free, NULL);
     g_slist_free (read_files);
 
     g_scanner_destroy (scanner);
@@ -806,7 +806,7 @@ appearance_settings_load_icon_themes (preview_data *pd)
     /* Free the check list */
     if (G_LIKELY (check_list))
     {
-        g_slist_foreach (check_list, (GFunc) g_free, NULL);
+        g_slist_foreach (check_list, (GFunc) (void (*)(void)) g_free, NULL);
         g_slist_free (check_list);
     }
 
@@ -950,7 +950,7 @@ appearance_settings_load_ui_themes (preview_data *pd)
     /* Free the check list */
     if (G_LIKELY (check_list))
     {
-        g_slist_foreach (check_list, (GFunc) g_free, NULL);
+        g_slist_foreach (check_list, (GFunc) (void (*)(void)) g_free, NULL);
         g_slist_free (check_list);
     }
 
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 7994f17..0f34fa4 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -2275,7 +2275,7 @@ on_output_event (FooScrollArea      *area,
      * on_canvas_event() for where we reset the cursor to the default if it
      * exits the outputs' area.
      */
-    if (!mirrored == 1 && get_n_connected() > 1)
+    if (!mirrored && get_n_connected() > 1)
         set_cursor (GTK_WIDGET (area), GDK_FLEUR);
 
     if (event->type == FOO_BUTTON_PRESS)
@@ -2284,7 +2284,7 @@ on_output_event (FooScrollArea      *area,
 
         gtk_combo_box_set_active (GTK_COMBO_BOX(randr_outputs_combobox), output->id);
 
-        if (!mirrored == 1 && get_n_connected() > 1)
+        if (!mirrored && get_n_connected() > 1)
         {
             foo_scroll_area_begin_grab (area, on_output_event, data);
 
@@ -2668,7 +2668,7 @@ on_area_paint (FooScrollArea *area,
         i = g_list_position (connected_outputs, list);
         /* Always paint the currently selected display last, i.e. on top, so it's
            visible and the name is readable */
-        if (i == active_output) {
+        if (i >= 0 && (guint)i == active_output) {
             continue;
         }
         paint_output (cr, i, &x, &y);
diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index e2a93a0..39f2afb 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -1191,11 +1191,11 @@ xfce_keyboard_settings_edit_button_clicked (XfceKeyboardSettings *settings)
     }
 
   /* Free row reference list */
-  g_list_foreach (row_references, (GFunc) gtk_tree_row_reference_free, NULL);
+  g_list_foreach (row_references, (GFunc) (void (*)(void)) gtk_tree_row_reference_free, NULL);
   g_list_free (row_references);
 
   /* Free row list */
-  g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
+  g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
   g_list_free (rows);
 }
 
@@ -1248,11 +1248,11 @@ xfce_keyboard_settings_delete_button_clicked (XfceKeyboardSettings *settings)
     }
 
   /* Free row reference list */
-  g_list_foreach (row_references, (GFunc) gtk_tree_row_reference_free, NULL);
+  g_list_foreach (row_references, (GFunc) (void (*)(void)) gtk_tree_row_reference_free, NULL);
   g_list_free (row_references);
 
   /* Free row list */
-  g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
+  g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
   g_list_free (rows);
 }
 
diff --git a/dialogs/mime-settings/xfce-mime-chooser.c b/dialogs/mime-settings/xfce-mime-chooser.c
index 323a275..8f61743 100644
--- a/dialogs/mime-settings/xfce-mime-chooser.c
+++ b/dialogs/mime-settings/xfce-mime-chooser.c
@@ -598,8 +598,8 @@ xfce_mime_chooser_set_mime_type (XfceMimeChooser *chooser,
     gtk_tree_view_expand_all (GTK_TREE_VIEW (chooser->treeview));
 
     /* cleanup */
-    g_list_foreach (recommended, (GFunc) g_object_unref, NULL);
-    g_list_foreach (all, (GFunc) g_object_unref, NULL);
+    g_list_foreach (recommended, (GFunc) (void (*)(void)) g_object_unref, NULL);
+    g_list_foreach (all, (GFunc) (void (*)(void)) g_object_unref, NULL);
     g_list_free (recommended);
     g_list_free (all);
     g_list_free (other);
diff --git a/dialogs/mime-settings/xfce-mime-window.c b/dialogs/mime-settings/xfce-mime-window.c
index a4e6fc2..a5afc17 100644
--- a/dialogs/mime-settings/xfce-mime-window.c
+++ b/dialogs/mime-settings/xfce-mime-window.c
@@ -1004,7 +1004,7 @@ xfce_mime_window_combo_populate (GtkCellRenderer *renderer,
     gtk_combo_box_set_model (GTK_COMBO_BOX (editable), GTK_TREE_MODEL (model));
     g_signal_connect_data (G_OBJECT (editable), "changed",
         G_CALLBACK (xfce_mime_window_combo_changed), data,
-        (GClosureNotify) xfce_mime_window_combo_unref_data, 0);
+        (GClosureNotify) (void (*)(void)) xfce_mime_window_combo_unref_data, 0);
     gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
         xfce_mime_window_combo_row_separator_func, NULL, NULL);
 
diff --git a/dialogs/mouse-settings/main.c b/dialogs/mouse-settings/main.c
index fddcc98..894eaae 100644
--- a/dialogs/mouse-settings/main.c
+++ b/dialogs/mouse-settings/main.c
@@ -200,7 +200,7 @@ mouse_settings_themes_pixbuf_from_filename (const gchar *filename,
         pixbuf = gdk_pixbuf_new_from_data (buffer, GDK_COLORSPACE_RGB, TRUE,
                                            8, image->width, image->height,
                                            4 * image->width,
-                                           (GdkPixbufDestroyNotify) g_free, NULL);
+                                           (GdkPixbufDestroyNotify) (void (*)(void)) g_free, NULL);
 
         /* don't leak when creating the pixbuf failed */
         if (G_UNLIKELY (pixbuf == NULL))
diff --git a/xfsettingsd/clipboard-manager.c b/xfsettingsd/clipboard-manager.c
index 16246ef..d944a9b 100644
--- a/xfsettingsd/clipboard-manager.c
+++ b/xfsettingsd/clipboard-manager.c
@@ -713,7 +713,7 @@ clipboard_manager_process_event (GsdClipboardManager *manager,
         switch (xev->xany.type) {
         case DestroyNotify:
                 if (xev->xdestroywindow.window == manager->priv->requestor) {
-                        g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
+                        g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
                         g_slist_free (manager->priv->contents);
                         manager->priv->contents = NULL;
 
@@ -741,7 +741,7 @@ clipboard_manager_process_event (GsdClipboardManager *manager,
                 if (xev->xselectionclear.selection == XA_CLIPBOARD_MANAGER) {
                         /* We lost the manager selection */
                         if (manager->priv->contents) {
-                                g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
+                                g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
                                 g_slist_free (manager->priv->contents);
                                 manager->priv->contents = NULL;
 
@@ -754,7 +754,7 @@ clipboard_manager_process_event (GsdClipboardManager *manager,
                 }
                 if (xev->xselectionclear.selection == XA_CLIPBOARD) {
                         /* We lost the clipboard selection */
-                        g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
+                        g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
                         g_slist_free (manager->priv->contents);
                         manager->priv->contents = NULL;
                         clipboard_manager_watch_cb (manager,
@@ -1016,13 +1016,13 @@ gsd_clipboard_manager_stop (GsdClipboardManager *manager)
         }
 
         if (manager->priv->conversions != NULL) {
-                g_slist_foreach (manager->priv->conversions, (GFunc) conversion_free, NULL);
+                g_slist_foreach (manager->priv->conversions, (GFunc) (void (*)(void)) conversion_free, NULL);
                 g_slist_free (manager->priv->conversions);
                 manager->priv->conversions = NULL;
         }
 
         if (manager->priv->contents != NULL) {
-                g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
+                g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
                 g_slist_free (manager->priv->contents);
                 manager->priv->contents = NULL;
         }
diff --git a/xfsettingsd/xsettings.c b/xfsettingsd/xsettings.c
index 7657465..1c26870 100644
--- a/xfsettingsd/xsettings.c
+++ b/xfsettingsd/xsettings.c
@@ -284,7 +284,7 @@ xfce_xsettings_helper_fc_free (XfceXSettingsHelper *helper)
     if (helper->fc_monitors != NULL)
     {
         /* remove monitors */
-        g_ptr_array_foreach (helper->fc_monitors, (GFunc) g_object_unref, NULL);
+        g_ptr_array_foreach (helper->fc_monitors, (GFunc) (void (*)(void)) g_object_unref, NULL);
         g_ptr_array_free (helper->fc_monitors, TRUE);
         helper->fc_monitors = NULL;
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list