From 0c3777d5661dd0bf60ba3db634f79c2121371092 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 18 Mar 2023 20:47:24 +0100 Subject: [PATCH] video: fix warnings about unused variables when building without duff's loop --- src/video/SDL_blit_A.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/SDL_blit_A.c b/src/video/SDL_blit_A.c index 0de42ae42..7494438fe 100644 --- a/src/video/SDL_blit_A.c +++ b/src/video/SDL_blit_A.c @@ -767,6 +767,7 @@ static void SDL_TARGETING("mmx") Blit565to565SurfaceAlphaMMX(SDL_BlitInfo *info) int dstskip = info->dst_skip >> 1; Uint32 s, d; +#ifdef USE_DUFFS_LOOP __m64 src1, dst1, src2, dst2, gmask, bmask, mm_res, mm_alpha; alpha &= ~(1 + 2 + 4); /* cut alpha to get the exact same behaviour */ @@ -782,6 +783,7 @@ static void SDL_TARGETING("mmx") Blit565to565SurfaceAlphaMMX(SDL_BlitInfo *info) /* Setup the 565 color channel masks */ gmask = _mm_set_pi32(0x07E007E0, 0x07E007E0); /* MASKGREEN -> gmask */ bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ +#endif while (height--) { /* *INDENT-OFF* */ /* clang-format off */ @@ -903,6 +905,7 @@ static void SDL_TARGETING("mmx") Blit555to555SurfaceAlphaMMX(SDL_BlitInfo *info) int dstskip = info->dst_skip >> 1; Uint32 s, d; +#ifdef USE_DUFFS_LOOP __m64 src1, dst1, src2, dst2, rmask, gmask, bmask, mm_res, mm_alpha; alpha &= ~(1 + 2 + 4); /* cut alpha to get the exact same behaviour */ @@ -919,7 +922,7 @@ static void SDL_TARGETING("mmx") Blit555to555SurfaceAlphaMMX(SDL_BlitInfo *info) rmask = _mm_set_pi32(0x7C007C00, 0x7C007C00); /* MASKRED -> rmask */ gmask = _mm_set_pi32(0x03E003E0, 0x03E003E0); /* MASKGREEN -> gmask */ bmask = _mm_set_pi32(0x001F001F, 0x001F001F); /* MASKBLUE -> bmask */ - +#endif while (height--) { /* *INDENT-OFF* */ /* clang-format off */ DUFFS_LOOP_124(