From dfb72f1a4cd9a74a8cfd63eb6e9e2accfafb532c Mon Sep 17 00:00:00 2001 From: kdx Date: Thu, 13 Apr 2023 09:04:54 +0200 Subject: maybe_unused --> void casts again --- inc/lzy.h | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/inc/lzy.h b/inc/lzy.h index 1a579fe..f4e7d67 100644 --- a/inc/lzy.h +++ b/inc/lzy.h @@ -228,9 +228,10 @@ static int _LZY_Sign(int n) { return (n > 0) - (n < 0); } -int LZY_Init([[maybe_unused]] const char *title, int target_fps, - [[maybe_unused]] const char *tset_path, - [[maybe_unused]] const char *font_path) { +int LZY_Init(const char *title, int target_fps, const char *tset_path, + const char *font_path) { + (void)title, (void)target_fps, (void)tset_path; + extern bopti_image_t LZY_GINT_TILESET; extern bopti_image_t LZY_GINT_FONT; @@ -389,32 +390,37 @@ int LZY_DrawText(int x, int y, const char *text) { return err; } -LZY_Music *LZY_MusicLoad([[maybe_unused]] const char *path) { +LZY_Music *LZY_MusicLoad(const char *path) { + (void)path; return NULL; } -int LZY_MusicDestroy([[maybe_unused]] LZY_Music *music) { +int LZY_MusicDestroy(LZY_Music *music) { + (void)music; return -1; } -int LZY_MusicPlay([[maybe_unused]] LZY_Music *music, - [[maybe_unused]] int loops) { +int LZY_MusicPlay(LZY_Music *music, int loops) { + (void)music, (void)loops; return -1; } -LZY_Sound *LZY_SoundLoad([[maybe_unused]] const char *path) { +LZY_Sound *LZY_SoundLoad(const char *path) { + (void)path; return NULL; } -int LZY_SoundDestroy([[maybe_unused]] LZY_Sound *sound) { +int LZY_SoundDestroy(LZY_Sound *sound) { + (void)sound; return -1; } -void LZY_SoundSetVolume([[maybe_unused]] LZY_Sound *sound, - [[maybe_unused]] float volume) {} +void LZY_SoundSetVolume(LZY_Sound *sound, float volume) { + (void)sound, (void)volume; +} -int LZY_SoundPlay([[maybe_unused]] LZY_Sound *sound, - [[maybe_unused]] int loops) { +int LZY_SoundPlay(LZY_Sound *sound, int loops) { + (void)sound, (void)loops; return -1; } @@ -454,7 +460,9 @@ int LZY_ShouldQuit(void) { return should_quit; } -void LZY_Log([[maybe_unused]] const char *fmt, ...) {} +void LZY_Log(const char *fmt, ...) { + (void)fmt; +} const char *LZY_GetError(void) { return NULL; -- cgit v1.2.3