[libegg] spreadtable: Avoid compiler warnings in the dnd test.



commit f3e48a5904085480ef8e24b30d2620f2cb435bfe
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Apr 19 17:10:11 2011 +0200

    spreadtable: Avoid compiler warnings in the dnd test.
    
    These happen while compiling as C++.

 libegg/spreadtable/testspreadtablednd.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libegg/spreadtable/testspreadtablednd.c b/libegg/spreadtable/testspreadtablednd.c
index 30530e3..abd9839 100644
--- a/libegg/spreadtable/testspreadtablednd.c
+++ b/libegg/spreadtable/testspreadtablednd.c
@@ -53,7 +53,7 @@ populate_spread_table_wrappy (EggSpreadTable *spread_table)
   children = gtk_container_get_children (GTK_CONTAINER (paper));
   for (l = children; l; l = l->next)
     {
-      GtkWidget *child = l->data;
+      GtkWidget *child = GTK_WIDGET (l->data);
 
       gtk_container_remove (GTK_CONTAINER (paper), child);
     }
@@ -85,7 +85,7 @@ static void
 orientation_changed (GtkComboBox   *box,
                      EggSpreadTable  *paper)
 {
-  GtkOrientation orientation = gtk_combo_box_get_active (box);
+  GtkOrientation orientation = (GtkOrientation)gtk_combo_box_get_active (box);
 
   gtk_orientable_set_orientation (GTK_ORIENTABLE (paper), orientation);
 }
@@ -103,7 +103,7 @@ static void
 spacing_changed (GtkSpinButton *button,
                  gpointer       data)
 {
-  GtkOrientation orientation = GPOINTER_TO_INT (data);
+  GtkOrientation orientation = (GtkOrientation)GPOINTER_TO_INT (data);
   gint           state = gtk_spin_button_get_value_as_int (button);
 
   if (orientation == GTK_ORIENTATION_HORIZONTAL)
@@ -118,16 +118,16 @@ static void
 halign_changed (GtkComboBox   *box,
                      EggSpreadTable  *paper)
 {
-  child_halign = gtk_combo_box_get_active (box);
+  child_halign = (GtkAlign)gtk_combo_box_get_active (box);
 
   populate_spread_table_wrappy (EGG_SPREAD_TABLE (paper));
 }
 
 
 static gboolean
-parent_drop_possible (EggSpreadTableDnd *table,
-		      GtkWidget         *child,
-		      gpointer           unused)
+parent_drop_possible (G_GNUC_UNUSED EggSpreadTableDnd *table,
+		      G_GNUC_UNUSED GtkWidget         *child,
+		      G_GNUC_UNUSED gpointer           user_data)
 {
   if (parent_accepts_drops)
     return TRUE;
@@ -136,9 +136,9 @@ parent_drop_possible (EggSpreadTableDnd *table,
 }
 
 static gboolean
-child_drop_possible (EggSpreadTableDnd *table,
-		     GtkWidget         *child,
-		     gpointer           unused)
+child_drop_possible (G_GNUC_UNUSED EggSpreadTableDnd *table,
+		     G_GNUC_UNUSED GtkWidget         *child,
+		     G_GNUC_UNUSED gpointer           user_data)
 {
   if (child_accepts_drops)
     return TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]