shithub: choc

Download patch

ref: aa44b2b3d553528a3a45dcde10c1cc3bcdac8419
parent: fdf3b4c33e61cbdd05d9408e3710c0449f9194fd
parent: b62b0655101f02c00ad3a13a42ca94915c2a4603
author: Turo Lamminen <[email protected]>
date: Wed Oct 19 07:15:40 EDT 2022

Merge pull request #1523 from turol/cppcheck

Fix signedness issue found by new cppcheck

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -906,8 +906,8 @@
 
     surface = SDL_CreateRGBSurfaceFrom((void *) icon_data, icon_w, icon_h,
                                        32, icon_w * 4,
-                                       0xff << 24, 0xff << 16,
-                                       0xff << 8, 0xff << 0);
+                                       0xffu << 24, 0xffu << 16,
+                                       0xffu << 8, 0xffu << 0);
 
     SDL_SetWindowIcon(screen, surface);
     SDL_FreeSurface(surface);
--- a/src/setup/mainmenu.c
+++ b/src/setup/mainmenu.c
@@ -278,8 +278,8 @@
 
     surface = SDL_CreateRGBSurfaceFrom((void *) setup_icon_data, setup_icon_w,
                                        setup_icon_h, 32, setup_icon_w * 4,
-                                       0xff << 24, 0xff << 16,
-                                       0xff << 8, 0xff << 0);
+                                       0xffu << 24, 0xffu << 16,
+                                       0xffu << 8, 0xffu << 0);
 
     SDL_SetWindowIcon(TXT_SDLWindow, surface);
     SDL_FreeSurface(surface);