diff --git a/src/io/file.cpp b/src/io/file.cpp index 0fc57c2..082fe25 100644 --- a/src/io/file.cpp +++ b/src/io/file.cpp @@ -449,7 +449,7 @@ char * File::loadTerminatedString (int maxSize) { * @return The new string */ char * File::loadFileName () { - int length; + int length = 0; char *string = new char[13]; for (int i = 0; i < 9; i++) { diff --git a/src/io/gfx/video.cpp b/src/io/gfx/video.cpp index f96df4e..6d7265f 100644 --- a/src/io/gfx/video.cpp +++ b/src/io/gfx/video.cpp @@ -278,6 +278,8 @@ void Video::deinit () { bool Video::reset (int width, int height) { #ifdef NO_RESIZE + (void)width; + (void)height; screenW = DEFAULT_SCREEN_WIDTH; screenH = DEFAULT_SCREEN_HEIGHT; fullscreen = true; @@ -600,7 +602,6 @@ void Video::expose () { * @param event The system event. Events not affecting video will be ignored */ void Video::update (SDL_Event *event) { - #if !defined(FULLSCREEN_ONLY) || !defined(NO_RESIZE) switch (event->type) { @@ -643,8 +644,9 @@ void Video::update (SDL_Event *event) { #endif } +#else + (void)event; #endif - } @@ -748,6 +750,8 @@ void Video::moviePlayback (bool status) { canvasH = movieH; } SDL_RenderSetLogicalSize(renderer, canvasW, canvasH); +#else + (void)status; #endif } diff --git a/src/menu/mainmenu.cpp b/src/menu/mainmenu.cpp index ccee020..84c7cf5 100644 --- a/src/menu/mainmenu.cpp +++ b/src/menu/mainmenu.cpp @@ -58,6 +58,7 @@ MainMenu::MainMenu () { if (res == TINFL_DECOMPRESS_MEM_TO_MEM_FAILED || res != oj_logo.size) { LOG_WARN("Could not uncompress logo (expected: %d, actual: %zu).", oj_logo.size, res); + logo = nullptr; } else {