From 868a4bf3fcbdee97a88b096d6b6ee01a2fcd3e22 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 13 Sep 2021 20:52:57 +0200 Subject: [PATCH] Fix some warnings; set gfx_white_texture to 0 in deinit function at the end --- gfx/gfx_display.c | 1 + libretro-common/formats/tga/rtga.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/gfx_display.c b/gfx/gfx_display.c index 16a8c39a51..475605a305 100644 --- a/gfx/gfx_display.c +++ b/gfx/gfx_display.c @@ -1307,6 +1307,7 @@ void gfx_display_deinit_white_texture(void) { if (gfx_white_texture) video_driver_texture_unload(&gfx_white_texture); + gfx_white_texture = 0; } void gfx_display_init_white_texture(void) diff --git a/libretro-common/formats/tga/rtga.c b/libretro-common/formats/tga/rtga.c index ff429fb240..ea29d8ba4c 100644 --- a/libretro-common/formats/tga/rtga.c +++ b/libretro-common/formats/tga/rtga.c @@ -266,9 +266,9 @@ static uint8_t *rtga_tga_load(rtga_context *s, int RLE_repeating = 0; int RLE_count = 0; int read_next_pixel = 1; - /* Needs to be at least 18 bytes to silence a GCC warning, + /* Needs to be at least 24 bytes to silence a GCC warning, * only 4 are actually used */ - unsigned char raw_data[18] = {0}; + unsigned char raw_data[24] = {0}; unsigned char *tga_palette = NULL; /* Do I need to load a palette? */