diff --git a/include/SDL3/SDL_audio.h b/include/SDL3/SDL_audio.h index 497411160c..8969128c5b 100644 --- a/include/SDL3/SDL_audio.h +++ b/include/SDL3/SDL_audio.h @@ -107,10 +107,10 @@ typedef Uint16 SDL_AudioFormat; /* masks for different parts of SDL_AudioFormat. */ -#define SDL_AUDIO_MASK_BITSIZE (0xFF) -#define SDL_AUDIO_MASK_FLOAT (1<<8) -#define SDL_AUDIO_MASK_BIG_ENDIAN (1<<12) -#define SDL_AUDIO_MASK_SIGNED (1<<15) +#define SDL_AUDIO_MASK_BITSIZE (0xFFu) +#define SDL_AUDIO_MASK_FLOAT (1u<<8) +#define SDL_AUDIO_MASK_BIG_ENDIAN (1u<<12) +#define SDL_AUDIO_MASK_SIGNED (1u<<15) /** diff --git a/include/SDL3/SDL_filesystem.h b/include/SDL3/SDL_filesystem.h index 17f4872a3c..76050053a6 100644 --- a/include/SDL3/SDL_filesystem.h +++ b/include/SDL3/SDL_filesystem.h @@ -333,7 +333,7 @@ extern DECLSPEC int SDLCALL SDL_RenamePath(const char *oldpath, const char *newp extern DECLSPEC int SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info); -#define SDL_GLOB_CASEINSENSITIVE (1 << 0) +#define SDL_GLOB_CASEINSENSITIVE (1u << 0) /** * Enumerate a directory tree, filtered by pattern, and return a list. diff --git a/include/SDL3/SDL_joystick.h b/include/SDL3/SDL_joystick.h index 00016c23c9..f0f12482f4 100644 --- a/include/SDL3/SDL_joystick.h +++ b/include/SDL3/SDL_joystick.h @@ -429,9 +429,9 @@ typedef struct SDL_VirtualJoystickDesc Uint16 product_id; /**< the USB product ID of this joystick */ Uint16 padding; /**< unused */ Uint32 button_mask; /**< A mask of which buttons are valid for this controller - e.g. (1 << SDL_GAMEPAD_BUTTON_SOUTH) */ + e.g. (1u << SDL_GAMEPAD_BUTTON_SOUTH) */ Uint32 axis_mask; /**< A mask of which axes are valid for this controller - e.g. (1 << SDL_GAMEPAD_AXIS_LEFTX) */ + e.g. (1u << SDL_GAMEPAD_AXIS_LEFTX) */ const char *name; /**< the name of the joystick */ void *userdata; /**< User data pointer passed to callbacks */ diff --git a/include/SDL3/SDL_mouse.h b/include/SDL3/SDL_mouse.h index 0ee16d884d..f8155953c3 100644 --- a/include/SDL3/SDL_mouse.h +++ b/include/SDL3/SDL_mouse.h @@ -521,7 +521,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_CursorVisible(void); * * \since This macro is available since SDL 3.0.0. */ -#define SDL_BUTTON(X) (1 << ((X)-1)) +#define SDL_BUTTON(X) (1u << ((X)-1)) #define SDL_BUTTON_LEFT 1 #define SDL_BUTTON_MIDDLE 2