[beast: 9/18] GXK: fix signedness compiler warnings



commit ddf83fdfea7ee7f8ac4337d1c45eaeba046e25d5
Author: Tim Janik <timj gnu org>
Date:   Thu Sep 24 20:34:51 2015 +0200

    GXK: fix signedness compiler warnings

 beast-gtk/gxk/gxkmenubutton.cc   |    2 +-
 beast-gtk/gxk/gxkracktable.cc    |    4 ++--
 beast-gtk/gxk/gxkscrollcanvas.cc |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/beast-gtk/gxk/gxkmenubutton.cc b/beast-gtk/gxk/gxkmenubutton.cc
index 60d332b..e308210 100644
--- a/beast-gtk/gxk/gxkmenubutton.cc
+++ b/beast-gtk/gxk/gxkmenubutton.cc
@@ -234,7 +234,7 @@ menu_button_max_size (GxkMenuButton *self)
     {
       GList *list, *children = GTK_MENU_SHELL (self->menu)->children;
       GtkRequisition child_requisition = { 0, };
-      guint width = 0, height = 0;
+      int width = 0, height = 0;
       for (list = children; list; list = list->next)
         {
           GtkWidget *mitem = (GtkWidget*) list->data;
diff --git a/beast-gtk/gxk/gxkracktable.cc b/beast-gtk/gxk/gxkracktable.cc
index 72be3a7..85f1fdd 100644
--- a/beast-gtk/gxk/gxkracktable.cc
+++ b/beast-gtk/gxk/gxkracktable.cc
@@ -456,8 +456,8 @@ gxk_rack_table_add (GtkContainer *container,
   if (col < 0 || row < 0)
     {
       guint r, c;
-      for (r = row < 0 ? 0 : row; r < (row < 0 ? table->nrows : row + 1); r++)
-        for (c = col < 0 ? 0 : col; c < (col < 0 ? table->ncols : col + 1); c++)
+      for (r = row < 0 ? 0 : row; r < uint (row < 0 ? table->nrows : row + 1); r++)
+        for (c = col < 0 ? 0 : col; c < uint (col < 0 ? table->ncols : col + 1); c++)
           if (gxk_rack_table_check_area (self,
                                          GXK_IS_RACK_ITEM (child) &&
                                          GXK_RACK_ITEM (child)->empty_frame,
diff --git a/beast-gtk/gxk/gxkscrollcanvas.cc b/beast-gtk/gxk/gxkscrollcanvas.cc
index 559d3f5..34dede0 100644
--- a/beast-gtk/gxk/gxkscrollcanvas.cc
+++ b/beast-gtk/gxk/gxkscrollcanvas.cc
@@ -44,8 +44,8 @@
 #define CANVAS_Y(self)            (TOP_PANEL_OFRAME (self) + TOP_PANEL_HEIGHT (self) + TOP_PANEL_CFRAME 
(self))
 #define CANVAS_HREST(self)        (RIGHT_PANEL_CFRAME (self) + RIGHT_PANEL_WIDTH (self) + RIGHT_PANEL_OFRAME 
(self))
 #define CANVAS_VREST(self)        (BOTTOM_PANEL_CFRAME (self) + BOTTOM_PANEL_HEIGHT (self) + 
BOTTOM_PANEL_OFRAME (self))
-#define WINDOW_WIDTH(self, rq_w)  MIN (G_MAXINT, CANVAS_X (self) + CANVAS_HREST (self) + (guint) rq_w)
-#define WINDOW_HEIGHT(self, rq_h) MIN (G_MAXINT, CANVAS_Y (self) + CANVAS_VREST (self) + (guint) rq_h)
+#define WINDOW_WIDTH(self, rq_w)  (int (MIN (uint (G_MAXINT), CANVAS_X (self) + CANVAS_HREST (self) + uint 
(rq_w))))
+#define WINDOW_HEIGHT(self, rq_h) (int (MIN (uint (G_MAXINT), CANVAS_Y (self) + CANVAS_VREST (self) + uint 
(rq_h))))
 /* layout (allocation) */
 #define CANVAS_WIDTH(self)        (ALLOCATION (self)->width - 2 * BORDER_WIDTH (self) - CANVAS_X (self) - 
CANVAS_HREST (self))
 #define CANVAS_HEIGHT(self)       (ALLOCATION (self)->height - 2 * BORDER_WIDTH (self) - CANVAS_Y (self) - 
CANVAS_VREST (self))


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