From 03d97baeec34aed9fb54b8b8d79cfc74a7528456 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 14 Sep 2015 23:25:19 -0700 Subject: [PATCH] GUI, 3DS: Fix some warnings --- src/platform/3ds/ctru-heap.c | 4 ++++ src/platform/3ds/main.c | 6 ++++-- src/util/gui/file-select.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/platform/3ds/ctru-heap.c b/src/platform/3ds/ctru-heap.c index f35dd9857..e7ca8044e 100644 --- a/src/platform/3ds/ctru-heap.c +++ b/src/platform/3ds/ctru-heap.c @@ -22,6 +22,8 @@ #include <3ds/types.h> #include <3ds/svc.h> +#include "util/common.h" + extern char* fake_heap_start; extern char* fake_heap_end; u32 __linear_heap; @@ -69,6 +71,8 @@ void __system_allocateHeaps() { void __attribute__((noreturn)) __libctru_exit(int rc) { + UNUSED(rc); + u32 tmp=0; // Unmap the linear heap diff --git a/src/platform/3ds/main.c b/src/platform/3ds/main.c index 1be1465dd..4caeb7a15 100644 --- a/src/platform/3ds/main.c +++ b/src/platform/3ds/main.c @@ -122,6 +122,7 @@ static void _drawTex(bool faded) { sf2d_draw_texture_scale_blend(tex, 80, 296, 1, -1, 0xFFFFFF3F | (faded ? 0 : 0xC0)); break; case SM_PA_BOTTOM: + default: sf2d_draw_texture_scale_blend(tex, 40, 296, 1, -1, 0xFFFFFF3F | (faded ? 0 : 0xC0)); break; case SM_AF_TOP: @@ -141,8 +142,8 @@ static void _drawTex(bool faded) { static void _drawFrame(struct GBAGUIRunner* runner, bool faded) { UNUSED(runner); - GSPGPU_FlushDataCache(0, renderer.outputBuffer, 256 * VIDEO_VERTICAL_PIXELS * 2); - GX_SetDisplayTransfer(0, renderer.outputBuffer, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), tex->data, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), 0x000002202); + GSPGPU_FlushDataCache(0, (u8*) renderer.outputBuffer, 256 * VIDEO_VERTICAL_PIXELS * 2); + GX_SetDisplayTransfer(0, (u32*) renderer.outputBuffer, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), tex->data, GX_BUFFER_DIM(256, VIDEO_VERTICAL_PIXELS), 0x000002202); _drawTex(faded); #if RESAMPLE_LIBRARY == RESAMPLE_BLIP_BUF if (!hasSound) { @@ -173,6 +174,7 @@ static void _drawScreenshot(struct GBAGUIRunner* runner, const uint32_t* pixels, } static uint16_t _pollGameInput(struct GBAGUIRunner* runner) { + UNUSED(runner); hidScanInput(); uint32_t activeKeys = hidKeysHeld() & 0xF00003FF; activeKeys |= activeKeys >> 24; diff --git a/src/util/gui/file-select.c b/src/util/gui/file-select.c index 2366e4bbb..023fe4039 100644 --- a/src/util/gui/file-select.c +++ b/src/util/gui/file-select.c @@ -74,7 +74,7 @@ static bool _refreshDirectory(struct GUIParams* params, const char* currentPath, params->guiPrepare(); } GUIFontPrintf(params->font, 0, GUIFontHeight(params->font), GUI_TEXT_LEFT, 0xFFFFFFFF, "%s", currentPath); - GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning for items: %lu)", i); + GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning for items: %zu)", i); if (params->guiFinish) { params->guiFinish(); } @@ -104,7 +104,7 @@ static bool _refreshDirectory(struct GUIParams* params, const char* currentPath, params->guiPrepare(); } GUIFontPrintf(params->font, 0, GUIFontHeight(params->font), GUI_TEXT_LEFT, 0xFFFFFFFF, "%s", currentPath); - GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning item %lu of %lu)", i, items); + GUIFontPrintf(params->font, 0, GUIFontHeight(params->font) * 2, GUI_TEXT_LEFT, 0xFFFFFFFF, "(scanning item %zu of %zu)", i, items); if (params->guiFinish) { params->guiFinish(); }