diff options
author | Christian Persch <chpe@src.gnome.org> | 2009-02-15 13:54:00 (GMT) |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2009-02-15 13:54:00 (GMT) |
commit | e702e87e40109bafae3aa8d14875a983ad562226 (patch) | |
tree | 3ba11a9ced5febc88874733c9bb5546ef80c621e | |
parent | 7d8aa7727a74f84c6fc473dbe87a923fd2c25959 (diff) |
Fix signed/unsigned compiler warnings.
* backend/dvi/dvi-document.c: (hsb2rgb): Fix signed/unsigned compiler
warnings.
svn path=/trunk/; revision=3465
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | backend/dvi/dvi-document.c | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,5 +1,10 @@ 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: * libview/Makefile.am: Rename GIRs to EvinceDocument/EvinceView. diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c index 7a5cca2..a6c3340 100644 --- a/backend/dvi/dvi-document.c +++ b/backend/dvi/dvi-document.c @@ -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; } |