From d3fc4db464827a7aa0e5a7c4bcb921709c343c9f Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 28 Nov 2021 03:03:02 +0300
Subject: [PATCH] minor mingwce warning fixes.
---
src/cpuinfo/SDL_cpuinfo.c | 9 +++++++++
src/video/gapi/SDL_gapivideo.c | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index c5a677b30..b902704fb 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -434,6 +434,13 @@ CPU_haveARMSIMD(void)
return 0;
}
+#elif defined(_WIN32_WCE)
+static int
+CPU_haveARMSIMD(void)
+{
+ return 0;
+}
+
#elif defined(__ARM_ARCH) && (__ARM_ARCH >= 6)
static int
CPU_haveARMSIMD(void)
@@ -521,6 +528,8 @@ static __inline__ int CPU_haveNEON(void)
{
#if !defined(__arm__) /* not an ARM CPU at all. */
return 0;
+#elif defined(_WIN32_WCE)
+ return 0;
/* The way you detect NEON is a privileged instruction on ARM, so you have
query the OS kernel in a platform-specific way. :/ */
#elif defined(__ARM_ARCH) && (__ARM_ARCH >= 8)
diff --git a/src/video/gapi/SDL_gapivideo.c b/src/video/gapi/SDL_gapivideo.c
index 0aafe394d..fe8097867 100644
--- a/src/video/gapi/SDL_gapivideo.c
+++ b/src/video/gapi/SDL_gapivideo.c
@@ -371,6 +371,7 @@ static SDL_VideoDevice *GAPI_CreateDevice(int devindex)
GAPI_DeleteDevice(device);
return 0;
}
+#undef gx
return device;
}
@@ -1082,8 +1083,8 @@ static int updateLine16to4(_THIS, PIXEL *srcPointer, unsigned char *destPointer,
static void GAPI_UpdateRectsMono(_THIS, int numrects, SDL_Rect *rects)
{
+ int linesProcessed = 0;
int i, height;
- int linesProcessed;
int xNibble, yNibble;
for (i=0; i<numrects; i++)