From 3018425dc1ec8955ec790f84a5cc8793190d0179 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Thu, 23 Jun 2016 02:03:06 +0200 Subject: Fix undefined variable warnings in dvi-backend taken from: https://git.gnome.org/browse/evince/commit/?id=c8ce06b --- backend/dvi/dvi-document.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'backend/dvi') diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c index 6ffa2514..c1e7d411 100644 --- a/backend/dvi/dvi-document.c +++ b/backend/dvi/dvi-document.c @@ -422,17 +422,17 @@ dvi_document_file_exporter_iface_init (EvFileExporterInterface *iface) static gboolean hsb2rgb (float h, float s, float v, guchar *red, guchar *green, guchar *blue) { - float i, f, p, q, t, r, g, b; - - if (h == 360) - h = 0; - else if ((h > 360) || (h < 0)) - return FALSE; + float f, p, q, t, r, g, b; + int i; s /= 100; v /= 100; h /= 60; i = floor (h); + if (i == 6) + i = 0; + else if ((i > 6) || (i < 0)) + return FALSE; f = h - i; p = v * (1 - s); q = v * (1 - (s * f)); -- cgit v1.2.1