From 20d395d9bcb78d37b111b68384d48c711b0a9ae0 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 27 Mar 2023 16:02:56 +0200 Subject: [PATCH] Fix -Wundef warnings due to use of unguarded SDL_ARM_NEON_BLITTERS --- src/video/SDL_blit_A.c | 8 ++++---- src/video/SDL_fillrect.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video/SDL_blit_A.c b/src/video/SDL_blit_A.c index 0782c47031..d4446b4dec 100644 --- a/src/video/SDL_blit_A.c +++ b/src/video/SDL_blit_A.c @@ -441,7 +441,7 @@ static void BlitRGBtoRGBPixelAlphaARMSIMD(SDL_BlitInfo *info) } #endif -#if SDL_ARM_NEON_BLITTERS +#if defined(SDL_ARM_NEON_BLITTERS) void BlitARGBto565PixelAlphaARMNEONAsm(int32_t w, int32_t h, uint16_t *dst, int32_t dst_stride, uint32_t *src, int32_t src_stride); static void BlitARGBto565PixelAlphaARMNEON(SDL_BlitInfo *info) @@ -1335,9 +1335,9 @@ SDL_CalculateBlitA(SDL_Surface *surface) } case 2: -#if SDL_ARM_NEON_BLITTERS || defined(SDL_ARM_SIMD_BLITTERS) +#if defined(SDL_ARM_NEON_BLITTERS) || defined(SDL_ARM_SIMD_BLITTERS) if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000 && sf->Gmask == 0xff00 && df->Gmask == 0x7e0 && ((sf->Rmask == 0xff && df->Rmask == 0x1f) || (sf->Bmask == 0xff && df->Bmask == 0x1f))) { -#if SDL_ARM_NEON_BLITTERS +#if defined(SDL_ARM_NEON_BLITTERS) if (SDL_HasNEON()) { return BlitARGBto565PixelAlphaARMNEON; } @@ -1368,7 +1368,7 @@ SDL_CalculateBlitA(SDL_Surface *surface) } #endif /* SDL_MMX_INTRINSICS */ if (sf->Amask == 0xff000000) { -#if SDL_ARM_NEON_BLITTERS +#if defined(SDL_ARM_NEON_BLITTERS) if (SDL_HasNEON()) { return BlitRGBtoRGBPixelAlphaARMNEON; } diff --git a/src/video/SDL_fillrect.c b/src/video/SDL_fillrect.c index f7545c660c..955fead0b9 100644 --- a/src/video/SDL_fillrect.c +++ b/src/video/SDL_fillrect.c @@ -247,7 +247,7 @@ int SDL_FillSurfaceRect(SDL_Surface *dst, const SDL_Rect *rect, Uint32 color) return SDL_FillSurfaceRects(dst, rect, 1, color); } -#if SDL_ARM_NEON_BLITTERS +#if defined(SDL_ARM_NEON_BLITTERS) void FillSurfaceRect8ARMNEONAsm(int32_t w, int32_t h, uint8_t *dst, int32_t dst_stride, uint8_t src); void FillSurfaceRect16ARMNEONAsm(int32_t w, int32_t h, uint16_t *dst, int32_t dst_stride, uint16_t src); void FillSurfaceRect32ARMNEONAsm(int32_t w, int32_t h, uint32_t *dst, int32_t dst_stride, uint32_t src); @@ -339,7 +339,7 @@ int SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count, return SDL_SetError("SDL_FillSurfaceRects(): Unsupported surface format"); } -#if SDL_ARM_NEON_BLITTERS +#if defined(SDL_ARM_NEON_BLITTERS) if (SDL_HasNEON() && dst->format->BytesPerPixel != 3 && fill_function == NULL) { switch (dst->format->BytesPerPixel) { case 1: