diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c index f88eae60f5..4e8dafe896 100644 --- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c @@ -969,9 +969,12 @@ void gl_renderchain_bind_prev_texture( bool gl_renderchain_add_lut(const struct video_shader *shader, unsigned i, GLuint *textures_lut) { - struct texture_image img = {0}; + struct texture_image img; enum texture_filter_type filter_type = TEXTURE_FILTER_LINEAR; + img.width = img.height = 0; + img.pixels = NULL; + if (!image_texture_load(&img, shader->lut[i].path)) { RARCH_ERR("Failed to load texture image from: \"%s\"\n", diff --git a/libretro-common/lists/dir_list.c b/libretro-common/lists/dir_list.c index c61eb1a449..fdba0dc475 100644 --- a/libretro-common/lists/dir_list.c +++ b/libretro-common/lists/dir_list.c @@ -222,12 +222,14 @@ int dir_list_read(const char *dir, struct string_list *list, struct string_list while (retro_readdir(entry)) { + char file_path[PATH_MAX_LENGTH]; bool is_dir = false; - char file_path[PATH_MAX_LENGTH] = {0}; int ret = 0; const char *name = retro_dirent_get_name(entry); const char *file_ext = path_get_extension(name); + file_path[0] = '\0'; + fill_pathname_join(file_path, dir, name, sizeof(file_path)); is_dir = retro_dirent_is_dir(entry, file_path); diff --git a/libretro-common/net/net_socket.c b/libretro-common/net/net_socket.c index 1daa7d27c6..7715e2b41a 100644 --- a/libretro-common/net/net_socket.c +++ b/libretro-common/net/net_socket.c @@ -26,7 +26,7 @@ int socket_init(void **address, uint16_t port, const char *server, enum socket_type type) { - char port_buf[16] = {0}; + char port_buf[16]; struct addrinfo hints = {0}; struct addrinfo **addrinfo = (struct addrinfo**)address; struct addrinfo *addr = NULL; @@ -50,6 +50,8 @@ int socket_init(void **address, uint16_t port, const char *server, enum socket_t if (!server) hints.ai_flags = AI_PASSIVE; + port_buf[0] = '\0'; + snprintf(port_buf, sizeof(port_buf), "%hu", (unsigned short)port); if (getaddrinfo_retro(server, port_buf, &hints, addrinfo) < 0) diff --git a/record/record_driver.c b/record/record_driver.c index 4087372c09..ec3e25deeb 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -302,7 +302,7 @@ void recording_push_audio(const int16_t *data, size_t samples) **/ bool recording_init(void) { - char recording_file[PATH_MAX_LENGTH] = {0}; + char recording_file[PATH_MAX_LENGTH]; struct ffemu_params params = {0}; struct retro_system_av_info *av_info = video_viewport_get_system_av_info(); bool *recording_enabled = recording_is_enabled(); @@ -312,6 +312,8 @@ bool recording_init(void) if (!*recording_enabled) return false; + recording_file[0] = '\0'; + if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) { RARCH_WARN("%s\n",