[gnome-panel/wip/free-the-fish: 9/10] free-the-fish.c: Add explicit cast for conversion to guchar



commit c34645de7efabe62b3d80dda1eca4c6fb46d9ffa
Author: Sebastian Geiger <sbastig gmx net>
Date:   Tue Jun 2 23:22:13 2015 +0200

    free-the-fish.c: Add explicit cast for conversion to guchar

 gnome-panel/free-the-fish.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnome-panel/free-the-fish.c b/gnome-panel/free-the-fish.c
index 422806b..20857dc 100644
--- a/gnome-panel/free-the-fish.c
+++ b/gnome-panel/free-the-fish.c
@@ -188,10 +188,10 @@ fish_unsea (cairo_surface_t *surface)
         for (row = 0; row < height; row++, pixels += rs) {
                 current_pixel = (guint32 *) pixels;
                 for (column = 0; column < width; column++, current_pixel++) {
-                        a = ((*current_pixel)>>24);
-                        r = (((*current_pixel)>>16)&0xff);
-                        g = (((*current_pixel)>> 8)&0xff);
-                        b = (((*current_pixel)>> 0)&0xff);
+                        a = (guchar) ((*current_pixel)>>24);
+                        r = (guchar) (((*current_pixel)>>16)&0xff);
+                        g = (guchar) (((*current_pixel)>> 8)&0xff);
+                        b = (guchar) (((*current_pixel)>> 0)&0xff);
                         if (FISH_PIXEL_STORE_MOVE(a, r, g, b))
                                 *current_pixel = 0;
                 }


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