From 9db05690e242933ca6e8d759af4d73ee53b840c4 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Wed, 1 Jan 2025 19:48:52 -0800 Subject: [PATCH] "conversion from unsigned int to const long requires a narrowing conversion" and why do you care so much to make this an error? GCC 9.3 is fine with it, it is taking an unsigned int (32-bit integer) and converting it to a signed long (32/64-bit signed integer). So what? --- src/gui/sdl_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/sdl_gui.cpp b/src/gui/sdl_gui.cpp index 3639b2b78f7..c7877e9856b 100644 --- a/src/gui/sdl_gui.cpp +++ b/src/gui/sdl_gui.cpp @@ -638,8 +638,8 @@ namespace WLGUI { void ObjSDLSurface::initFromSurface(void) { viewport.w = abs(surface->w); viewport.h = abs(surface->h); - scaleSrc = { viewport.w, viewport.h }; - scaleDst = { viewport.w, viewport.h }; + scaleSrc = { (long)viewport.w, (long)viewport.h }; + scaleDst = { (long)viewport.w, (long)viewport.h }; ColorDescription.BitsPerPixel = surface->format->BitsPerPixel; ColorDescription.BytesPerPixel = surface->format->BytesPerPixel;