[libwnck/wip/warnings3: 4/12] xutils: fix 'comparison between signed and unsigned integer' warnings



commit cb2abff62ff3facd260804a90c8ac805146b9b20
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Apr 28 13:59:20 2017 +0300

    xutils: fix 'comparison between signed and unsigned integer' warnings

 libwnck/xutils.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 9bb1681..7995a83 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -1451,7 +1451,7 @@ find_largest_sizes (gulong *data,
       w = data[0];
       h = data[1];
 
-      if (nitems < ((w * h) + 2))
+      if (nitems < ((gulong) (w * h) + 2))
         return FALSE; /* not enough data */
 
       *width = MAX (w, *width);
@@ -1507,7 +1507,7 @@ find_best_size (gulong  *data,
       w = data[0];
       h = data[1];
 
-      if (nitems < ((w * h) + 2))
+      if (nitems < ((gulong) (w * h) + 2))
         break; /* not enough data */
 
       if (best_start == NULL)
@@ -1711,7 +1711,7 @@ _wnck_cairo_surface_get_from_pixmap (Screen *screen,
       if (!XGetWindowAttributes (display, root_return, &attrs))
         goto TRAP_POP;
 
-      if (depth_ret == attrs.depth)
+      if (depth_ret == (unsigned int) attrs.depth)
        {
          surface = cairo_xlib_surface_create (display,
                                               xpixmap,


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