evince r3465 - in trunk: . backend/dvi



Author: chpe
Date: Sun Feb 15 13:54:00 2009
New Revision: 3465
URL: http://svn.gnome.org/viewvc/evince?rev=3465&view=rev

Log:
	* backend/dvi/dvi-document.c: (hsb2rgb): Fix signed/unsigned compiler
        warnings.

Modified:
   trunk/ChangeLog
   trunk/backend/dvi/dvi-document.c

Modified: trunk/backend/dvi/dvi-document.c
==============================================================================
--- trunk/backend/dvi/dvi-document.c	(original)
+++ trunk/backend/dvi/dvi-document.c	Sun Feb 15 13:54:00 2009
@@ -428,7 +428,7 @@
 #define RGB2ULONG(r,g,b) ((0xFF<<24)|(r<<16)|(g<<8)|(b))
 
 static gboolean
-hsb2rgb (float h, float s, float v, char *red, char *green, char *blue)
+hsb2rgb (float h, float s, float v, guchar *red, guchar *green, guchar *blue)
 {
         float i, f, p, q, t, r, g, b;
 
@@ -472,9 +472,9 @@
 		b = q;
 	}
 
-        (*red) = (char)floor(r * 255);
-        (*green) = (char)floor(g * 255);
-        (*blue) = (char)floor(b * 255);
+        *red   = (guchar)floor(r * 255.0);
+        *green = (guchar)floor(g * 255.0);
+        *blue  = (guchar)floor(b * 255.0);
 	
         return TRUE;
 }



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