Skip to content

Commit

Permalink
chore: fix some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
carstene1ns committed Dec 29, 2024
1 parent b0981ba commit 626542f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/io/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
8 changes: 6 additions & 2 deletions src/io/gfx/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {

Expand Down Expand Up @@ -643,8 +644,9 @@ void Video::update (SDL_Event *event) {
#endif

}
#else
(void)event;
#endif

}


Expand Down Expand Up @@ -748,6 +750,8 @@ void Video::moviePlayback (bool status) {
canvasH = movieH;
}
SDL_RenderSetLogicalSize(renderer, canvasW, canvasH);
#else
(void)status;
#endif
}

Expand Down
1 change: 1 addition & 0 deletions src/menu/mainmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit 626542f

Please sign in to comment.