]> www.fi.muni.cz Git - evince.git/commitdiff
Fix signed/unsigned compiler warnings.
authorChristian Persch <chpe@src.gnome.org>
Sun, 15 Feb 2009 13:54:00 +0000 (13:54 +0000)
committerChristian Persch <chpe@src.gnome.org>
Sun, 15 Feb 2009 13:54:00 +0000 (13:54 +0000)
* backend/dvi/dvi-document.c: (hsb2rgb): Fix signed/unsigned compiler
        warnings.

svn path=/trunk/; revision=3465

ChangeLog
backend/dvi/dvi-document.c

index 0aa57947defaff75ae0f52b2e3780b0fa3f8f5db..10d80dce37d9b352f0452bdfa853baeca5501c23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-15  Christian Persch  <chpe@gnome.org>
+
+       * backend/dvi/dvi-document.c: (hsb2rgb): Fix signed/unsigned compiler
+        warnings.
+
 2009-02-15  Christian Persch  <chpe@gnome.org>
 
        * libdocument/Makefile.am:
index 7a5cca262e386845d7db0f12924794825451fee8..a6c33408c14d4c741b94e98440b6172e313eb7fb 100644 (file)
@@ -428,7 +428,7 @@ dvi_document_file_exporter_iface_init (EvFileExporterIface *iface)
 #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 @@ hsb2rgb (float h, float s, float v, char *red, char *green, char *blue)
                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;
 }