[eog] EogPrintPreview: Silence -Wsign-compare



commit be81fa70d6f8ca82ee9beec8dbaf5391f9c5d36a
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Mar 11 18:54:49 2016 +0100

    EogPrintPreview: Silence -Wsign-compare
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763505

 src/eog-print-preview.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-print-preview.c b/src/eog-print-preview.c
index cfd9db1..2182b2d 100644
--- a/src/eog-print-preview.c
+++ b/src/eog-print-preview.c
@@ -613,13 +613,15 @@ press_inside_image_area (EogPrintPreview *preview,
                         guint y)
 {
        EogPrintPreviewPrivate *priv;
+       const gint xs = (gint) x;
+       const gint ys = (gint) y;
        gint x0, y0;
 
        priv = preview->priv;
        get_current_image_coordinates (preview, &x0, &y0);
 
-       if (x >= x0 &&  y >= y0 &&
-           x <= x0 + priv->r_width && y <= y0 + priv->r_height)
+       if (xs >= x0 &&  ys >= y0 &&
+           xs <= x0 + priv->r_width && ys <= y0 + priv->r_height)
                return TRUE;
 
        return FALSE;


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