From 0d1e0a044b26607800746db399743fcaefb4ab24 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 28 Sep 2024 04:32:02 +0300 Subject: [PATCH] silence -Wunused-parameter warnings when building w/o harfbuzz support. --- src/SDL_ttf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c index d2966704..cea17dde 100644 --- a/src/SDL_ttf.c +++ b/src/SDL_ttf.c @@ -2820,6 +2820,7 @@ bool TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction) font->hb_direction = dir; return true; #else + (void) direction; return SDL_SetError("Unsupported"); #endif } @@ -2845,6 +2846,7 @@ bool TTF_SetFontScript(TTF_Font *font, const char *script) font->hb_script = scr; return true; #else + (void) script; return SDL_SetError("Unsupported"); #endif } @@ -2885,6 +2887,9 @@ bool TTF_GetGlyphScript(Uint32 ch, char *script, size_t script_size) return true; #else + (void) script; + (void) script_size; + (void) ch; return SDL_SetError("Unsupported"); #endif } @@ -2901,6 +2906,7 @@ bool TTF_SetFontLanguage(TTF_Font *font, const char *language_bcp47) } return true; #else + (void) language_bcp47; return SDL_SetError("Unsupported"); #endif }