diff --git a/configuration.c b/configuration.c index af8979c63f..cd33faec0d 100644 --- a/configuration.c +++ b/configuration.c @@ -1480,7 +1480,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, static struct config_float_setting *populate_settings_float(settings_t *settings, int *size) { unsigned count = 0; - struct config_float_setting *tmp = (struct config_float_setting*)malloc((*size + 1) * sizeof(struct config_float_setting)); + struct config_float_setting *tmp = (struct config_float_setting*)calloc(1, (*size + 1) * sizeof(struct config_float_setting)); SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, aspect_ratio, false); SETTING_FLOAT("video_scale", &settings->floats.video_scale, false, 0.0f, false); diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 48db5e2508..f9fb7095c0 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -808,8 +808,7 @@ static bool vulkan_init_filter_chain_preset(vk_t *vk, const char *shader_path) static bool vulkan_init_filter_chain(vk_t *vk) { - settings_t *settings = config_get_ptr(); - const char *shader_path = retroarch_get_shader_preset(); + const char *shader_path = retroarch_get_shader_preset(); enum rarch_shader_type type = video_shader_parse_type(shader_path, RARCH_SHADER_NONE); diff --git a/verbosity.c b/verbosity.c index 7b76838eb1..4b8dd7cc92 100644 --- a/verbosity.c +++ b/verbosity.c @@ -214,8 +214,8 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap) void RARCH_LOG_BUFFER(uint8_t *data, size_t size) { unsigned i, offset; - int padding = size % 16; - uint8_t buf[16]; + int padding = size % 16; + uint8_t buf[16] = {0}; RARCH_LOG("== %d-byte buffer ==================\n", size);