From 082fa22b05bd87d8b5e9fc9123a3e82e1a91192c Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Sat, 30 Jan 2021 15:46:02 +0100 Subject: [PATCH] Clean all the warnings in PS2 --- Makefile.ps2 | 2 +- audio/drivers/ps2_audio.c | 4 +--- frontend/drivers/platform_ps2.c | 2 +- gfx/drivers/ps2_gfx.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile.ps2 b/Makefile.ps2 index d8f89dda88..78313cbc48 100644 --- a/Makefile.ps2 +++ b/Makefile.ps2 @@ -19,7 +19,7 @@ else endif ifeq ($(MUTE_WARNINGS), 1) - DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses -Wdiscarded-qualifiers + DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation endif INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include diff --git a/audio/drivers/ps2_audio.c b/audio/drivers/ps2_audio.c index 080f2b708c..c16be245e6 100644 --- a/audio/drivers/ps2_audio.c +++ b/audio/drivers/ps2_audio.c @@ -35,15 +35,13 @@ typedef struct ps2_audio static void audioConfigure(ps2_audio_t *ps2, unsigned rate) { - int err; struct audsrv_fmt_t format; format.bits = AUDIO_BITS; format.freq = rate; format.channels = AUDIO_CHANNELS; - err = audsrv_set_format(&format); - + audsrv_set_format(&format); audsrv_set_volume(MAX_VOLUME); } diff --git a/frontend/drivers/platform_ps2.c b/frontend/drivers/platform_ps2.c index 4129fb502e..43069f2894 100644 --- a/frontend/drivers/platform_ps2.c +++ b/frontend/drivers/platform_ps2.c @@ -218,7 +218,7 @@ static void frontend_ps2_exec(const char *path, bool should_load_game) if (should_load_game && !path_is_empty(RARCH_PATH_CONTENT)) { args++; - argv[0] = path_get(RARCH_PATH_CONTENT); + argv[0] = (char *)path_get(RARCH_PATH_CONTENT); } #endif LoadELFFromFile(path, args, argv); diff --git a/gfx/drivers/ps2_gfx.c b/gfx/drivers/ps2_gfx.c index ad7059bc0d..78930dc7e6 100644 --- a/gfx/drivers/ps2_gfx.c +++ b/gfx/drivers/ps2_gfx.c @@ -274,7 +274,7 @@ static bool ps2_gfx_frame(void *data, const void *frame, #if defined(DEBUG) if (frame_count % 180 == 0) - printf("ps2_gfx_frame %lu\n", frame_count); + printf("ps2_gfx_frame %llu\n", frame_count); #endif if (frame)