From a63ad76603accc70747a2073c78139299064c43b Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 1 Jan 2023 20:05:42 +0100 Subject: FLUID refactor and macOS warnings removed (#623) P renamed to g_project class Project renamed to class Fluid_Project fixes macOS type cast warnings --- src/Fl_File_Icon2.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Fl_File_Icon2.cxx') diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx index 5b6334771..f81fa8af0 100644 --- a/src/Fl_File_Icon2.cxx +++ b/src/Fl_File_Icon2.cxx @@ -455,15 +455,15 @@ int Fl_File_Icon::load_image(const char *ifile) // I - File to read from case 3 : val[0] = lineptr[0]; val[1] = '\0'; - red = 255 * strtol(val, NULL, 16) / 15; + red = 255 * (int)strtol(val, NULL, 16) / 15; val[0] = lineptr[1]; val[1] = '\0'; - green = 255 * strtol(val, NULL, 16) / 15; + green = 255 * (int)strtol(val, NULL, 16) / 15; val[0] = lineptr[2]; val[1] = '\0'; - blue = 255 * strtol(val, NULL, 16) / 15; + blue = 255 * (int)strtol(val, NULL, 16) / 15; break; case 6 : @@ -474,17 +474,17 @@ int Fl_File_Icon::load_image(const char *ifile) // I - File to read from val[0] = lineptr[0]; val[1] = lineptr[1]; val[2] = '\0'; - red = strtol(val, NULL, 16); + red = (int)strtol(val, NULL, 16); val[0] = lineptr[j + 0]; val[1] = lineptr[j + 1]; val[2] = '\0'; - green = strtol(val, NULL, 16); + green = (int)strtol(val, NULL, 16); val[0] = lineptr[2 * j + 0]; val[1] = lineptr[2 * j + 1]; val[2] = '\0'; - blue = strtol(val, NULL, 16); + blue = (int)strtol(val, NULL, 16); break; } -- cgit v1.2.3