summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-01-10 17:06:55 +0100
committerMatthias Melcher <github@matthiasm.com>2023-01-10 17:07:03 +0100
commitf576faf2a6cf2aff8e22264abf506accae009dc3 (patch)
treececd766f8c2013e64af8b994df03212679ced406 /test
parent5e133c1e8813ad19cb64812a4a68d45093a4a217 (diff)
Fix new warnings in CI
Diffstat (limited to 'test')
-rw-r--r--test/mandelbrot.cxx4
1 files changed, 2 insertions, 2 deletions
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);
}