SDL: fix compilation error SDL_coreaudio mixing declarations and code

From e41942e8140566d76284bea61130de8e125a17d0 Mon Sep 17 00:00:00 2001
From: daniel <[EMAIL REDACTED]>
Date: Wed, 5 Oct 2022 13:36:25 +1000
Subject: [PATCH] fix compilation error SDL_coreaudio mixing declarations and
 code

---
 src/audio/coreaudio/SDL_coreaudio.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/audio/coreaudio/SDL_coreaudio.m b/src/audio/coreaudio/SDL_coreaudio.m
index 63ce6a5d3001..6cfc035e4ada 100644
--- a/src/audio/coreaudio/SDL_coreaudio.m
+++ b/src/audio/coreaudio/SDL_coreaudio.m
@@ -1177,6 +1177,7 @@ output device (in which case we'll try again). */
     char *devname;
     int usable;
     double sampleRate;
+    CFIndex len;
 
     AudioObjectPropertyAddress addr = {
         iscapture ? kAudioHardwarePropertyDefaultInputDevice
@@ -1222,7 +1223,7 @@ output device (in which case we'll try again). */
             return SDL_SetError("%s: Default Device Name not found", "coreaudio");
         }
 
-        CFIndex len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr),
+        len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr),
                                                         kCFStringEncodingUTF8);
         devname = (char *) SDL_malloc(len + 1);
         usable = ((devname != NULL) &&