[nautilus-ideviceinfo/gtk3] Silence compiler warnings about signedness when using MAX()



commit 84d1e77089b849e2c586933677cab8c17f2236fb
Author: Martin Szulecki <m szulecki libimobiledevice org>
Date:   Fri Jan 9 02:48:36 2015 +0100

    Silence compiler warnings about signedness when using MAX()

 src/rb-segmented-bar.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/rb-segmented-bar.c b/src/rb-segmented-bar.c
index 55afab5..59a2c8a 100644
--- a/src/rb-segmented-bar.c
+++ b/src/rb-segmented-bar.c
@@ -290,7 +290,7 @@ rb_segmented_bar_get_preferred_height (GtkWidget *widget, int *minimum_height, i
 
        if (priv->show_labels) {
                compute_layout_size (RB_SEGMENTED_BAR (widget));
-               height = MAX (MINIMUM_HEIGHT + priv->bar_label_spacing + priv->layout_height, height);
+               height = MAX (MINIMUM_HEIGHT + priv->bar_label_spacing + priv->layout_height, 
(unsigned)height);
        }
 
        if (minimum_height)
@@ -400,13 +400,13 @@ compute_layout_size (RBSegmentedBar *bar)
                height = label_height + value_height;
 
                segment->layout_width = width;
-               segment->layout_height = MAX (height, priv->segment_box_size*2);
+               segment->layout_height = MAX ((unsigned)height, priv->segment_box_size*2);
 
                priv->layout_width += segment->layout_width + priv->segment_box_size + 
priv->segment_box_spacing;
                if (it->next != NULL) {
                        priv->layout_width += priv->segment_label_spacing;
                }
-               priv->layout_height = MAX (priv->layout_height, segment->layout_height);
+               priv->layout_height = MAX (priv->layout_height, (unsigned)segment->layout_height);
        }
 
        g_object_unref (G_OBJECT (layout));
@@ -431,7 +431,7 @@ rb_segmented_bar_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
        if (priv->show_labels) {
                compute_layout_size (RB_SEGMENTED_BAR (widget));
                new_allocation.height = MAX (priv->bar_height + priv->bar_label_spacing + priv->layout_height,
-                                        real_height);
+                                        (unsigned)real_height);
        } else {
                new_allocation.height = real_height;
        }


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