From d526225e95481e1135435d1d21d96eec2903def5 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 14 Aug 2024 15:56:24 +0800 Subject: [PATCH] music_*: fix remaining cases of incorrect attribute placement --- src/codecs/music_flac.c | 2 +- src/codecs/music_gme.c | 2 +- src/codecs/music_modplug.c | 2 +- src/codecs/music_mpg123.c | 2 +- src/codecs/music_ogg.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/codecs/music_flac.c b/src/codecs/music_flac.c index ac557f262..223c66b82 100644 --- a/src/codecs/music_flac.c +++ b/src/codecs/music_flac.c @@ -92,11 +92,11 @@ static flac_loader flac; if (flac.FUNC == NULL) { Mix_SetError("Missing FLAC.framework"); return -1; } #endif -static int FLAC_Load(void) #ifdef __APPLE__ /* Need to turn off optimizations so weak framework load check works */ __attribute__ ((optnone)) #endif +static int FLAC_Load(void) { if (flac.loaded == 0) { #ifdef FLAC_DYNAMIC diff --git a/src/codecs/music_gme.c b/src/codecs/music_gme.c index 7a7cd5c33..aacf1dde4 100644 --- a/src/codecs/music_gme.c +++ b/src/codecs/music_gme.c @@ -60,11 +60,11 @@ static gme_loader gme; if (gme.FUNC == NULL) { Mix_SetError("Missing gme.framework"); return -1; } #endif -static int GME_Load(void) #ifdef __APPLE__ /* Need to turn off optimizations so weak framework load check works */ __attribute__ ((optnone)) #endif +static int GME_Load(void) { if (gme.loaded == 0) { #ifdef GME_DYNAMIC diff --git a/src/codecs/music_modplug.c b/src/codecs/music_modplug.c index 7a9c586c2..ebc2e8710 100644 --- a/src/codecs/music_modplug.c +++ b/src/codecs/music_modplug.c @@ -62,11 +62,11 @@ static ModPlug_Settings settings; if (modplug.FUNC == NULL) { Mix_SetError("Missing libmodplug.framework"); return -1; } #endif -static int MODPLUG_Load(void) #ifdef __APPLE__ /* Need to turn off optimizations so weak framework load check works */ __attribute__ ((optnone)) #endif +static int MODPLUG_Load(void) { if (modplug.loaded == 0) { #ifdef MODPLUG_DYNAMIC diff --git a/src/codecs/music_mpg123.c b/src/codecs/music_mpg123.c index 6ea0f216c..823dc4457 100644 --- a/src/codecs/music_mpg123.c +++ b/src/codecs/music_mpg123.c @@ -82,11 +82,11 @@ static mpg123_loader mpg123; if (mpg123.FUNC == NULL) { Mix_SetError("Missing mpg123.framework"); return -1; } #endif -static int MPG123_Load(void) #ifdef __APPLE__ /* Need to turn off optimizations so weak framework load check works */ __attribute__ ((optnone)) #endif +static int MPG123_Load(void) { if (mpg123.loaded == 0) { #ifdef MPG123_DYNAMIC diff --git a/src/codecs/music_ogg.c b/src/codecs/music_ogg.c index 459a5cf1b..542225041 100644 --- a/src/codecs/music_ogg.c +++ b/src/codecs/music_ogg.c @@ -73,11 +73,11 @@ static vorbis_loader vorbis; if (vorbis.FUNC == NULL) { Mix_SetError("Missing vorbis.framework or tremor.framework"); return -1; } #endif -static int OGG_Load(void) #ifdef __APPLE__ /* Need to turn off optimizations so weak framework load check works */ __attribute__ ((optnone)) #endif +static int OGG_Load(void) { if (vorbis.loaded == 0) { #ifdef OGG_DYNAMIC