From 26bd92eda2f9420e0c33877efe331f8d7c0c157a Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 8 Aug 2023 17:11:50 +0300
Subject: [PATCH] replace an SDL_copyp use to avoid -Wunused-local-typedefs
warning.
happens e.g. with gcc-4.8, gcc-4.9, etc. we already know that the
pointers are of the same type in ParseAudioFormat(), therefore, no
danger there.
---
src/sdl2_compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index bf5cd31..bb0b33a 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -3693,7 +3693,7 @@ static SDL_AudioFormat ParseAudioFormat(const char *string)
static int PrepareAudiospec(const SDL2_AudioSpec *orig2, SDL2_AudioSpec *prepared2)
{
- SDL3_copyp(prepared2, orig2);
+ SDL3_memcpy(prepared2, orig2, sizeof(*orig2));
if (orig2->freq == 0) {
static const int DEFAULT_FREQ = 22050;