From f576faf2a6cf2aff8e22264abf506accae009dc3 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 10 Jan 2023 17:06:55 +0100 Subject: Fix new warnings in CI --- test/mandelbrot.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/mandelbrot.cxx b/test/mandelbrot.cxx index 430877c9d..e3f2cd15f 100644 --- a/test/mandelbrot.cxx +++ b/test/mandelbrot.cxx @@ -53,7 +53,7 @@ const unsigned int palette[] = { const size_t palette_size = sizeof(palette)/sizeof(palette[0]); void get_color(float t, uchar& r, uchar& g, uchar& b) { - int index = (1-t) * palette_size; + int index = (int)((1-t) * palette_size); Fl_Color c = palette[index % palette_size] << 8; Fl::get_color(c, r, g, b); } @@ -174,7 +174,7 @@ int Drawing_Area::idle() { wx = t = 1-double(i)/(1<<10); if (t <= 0) t = 0; else for (i=brightness; i--;) t*=wx; if (use_colors) { - get_color(t, *p, *(p+1), *(p+2)); + get_color((float)t, *p, *(p+1), *(p+2)); } else { *p = 255 - int(254*t); } -- cgit v1.2.3