From efdcfef4b94c41229b92633e184b17b7f3c4d01c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 13 Aug 2024 10:52:50 -0700
Subject: [PATCH] Fixed Android build warnings
---
src/cpuinfo/SDL_cpuinfo.c | 2 +-
src/render/SDL_render.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index 734960b2332d2..ba886d976f2c9 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -859,7 +859,7 @@ int SDL_GetCPUCacheLineSize(void)
cacheline_size = c & 0xff;
} else {
#if defined(HAVE_SYSCONF) && defined(_SC_LEVEL1_DCACHE_LINESIZE)
- if ((cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE)) > 0) {
+ if ((cacheline_size = (int)sysconf(_SC_LEVEL1_DCACHE_LINESIZE)) > 0) {
return cacheline_size;
} else {
cacheline_size = SDL_CACHELINE_SIZE;
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 68682c274bf4e..28ae90a1fcd2a 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1497,7 +1497,7 @@ SDL_Texture *SDL_CreateTexture(SDL_Renderer *renderer, SDL_PixelFormat format, S
static int SDL_UpdateTextureFromSurface(SDL_Texture *texture, SDL_Rect *rect, SDL_Surface *surface)
{
- int access;
+ SDL_TextureAccess access;
SDL_bool direct_update;
SDL_PixelFormat tex_format;
SDL_PropertiesID surface_props;
@@ -1519,8 +1519,8 @@ static int SDL_UpdateTextureFromSurface(SDL_Texture *texture, SDL_Rect *rect, SD
return -1;
}
- tex_format = SDL_GetNumberProperty(tex_props, SDL_PROP_TEXTURE_FORMAT_NUMBER, 0);
- access = SDL_GetNumberProperty(tex_props, SDL_PROP_TEXTURE_ACCESS_NUMBER, 0);
+ tex_format = (SDL_PixelFormat)SDL_GetNumberProperty(tex_props, SDL_PROP_TEXTURE_FORMAT_NUMBER, 0);
+ access = (SDL_TextureAccess)SDL_GetNumberProperty(tex_props, SDL_PROP_TEXTURE_ACCESS_NUMBER, 0);
if (access != SDL_TEXTUREACCESS_STATIC && access != SDL_TEXTUREACCESS_STREAMING) {
return -1;