From 9c8e403f6ba01a5743c3b092b33c7be73b0e6ec6 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 30 Aug 2019 11:35:20 +0300 Subject: [PATCH] use 'U' suffix on constants instead of (unsigned int) cast. --- src/core/android/SDL_android.c | 2 +- src/joystick/controller_type.h | 2 +- src/video/SDL_RLEaccel.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c index ce88e793a9fb6..26bcd555c6765 100644 --- a/src/core/android/SDL_android.c +++ b/src/core/android/SDL_android.c @@ -2400,7 +2400,7 @@ int Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *bu if (messageboxdata->colorScheme) { colors = (*env)->NewIntArray(env, SDL_MESSAGEBOX_COLOR_MAX); for (i = 0; i < SDL_MESSAGEBOX_COLOR_MAX; ++i) { - temp = ((unsigned int)0xFF << 24) | + temp = (0xFFU << 24) | (messageboxdata->colorScheme->colors[i].r << 16) | (messageboxdata->colorScheme->colors[i].g << 8) | (messageboxdata->colorScheme->colors[i].b << 0); diff --git a/src/joystick/controller_type.h b/src/joystick/controller_type.h index 32ce70f8bb9fe..4015d7cad2c96 100644 --- a/src/joystick/controller_type.h +++ b/src/joystick/controller_type.h @@ -61,7 +61,7 @@ typedef enum k_eControllertype_GenericMouse = 800, } EControllerType; -#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | nPID ) +#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | (unsigned int)nPID ) typedef struct { unsigned int m_unDeviceID; diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c index 46394091911f5..bcb33f4c9c41d 100644 --- a/src/video/SDL_RLEaccel.c +++ b/src/video/SDL_RLEaccel.c @@ -295,10 +295,10 @@ } while(0) #define ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) \ - ALPHA_BLIT16_50(to, from, length, bpp, alpha, (unsigned int)0xf7de) + ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7deU) #define ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) \ - ALPHA_BLIT16_50(to, from, length, bpp, alpha, (unsigned int)0xfbde) + ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbdeU) #define CHOOSE_BLIT(blitter, alpha, fmt) \ do { \