From 6fc0d743f12d4a1e72748cdc423ddd04b500a93b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 26 Oct 2020 12:01:59 +0100 Subject: Cleanup: compiler warnings --- source/blender/blenkernel/intern/lattice_deform_test.cc | 14 +++++++------- source/blender/gpu/intern/gpu_shader.cc | 4 ++-- source/blender/gpu/opengl/gl_debug.cc | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/blender/blenkernel/intern/lattice_deform_test.cc b/source/blender/blenkernel/intern/lattice_deform_test.cc index 33a4cc1d871..7db9d941458 100644 --- a/source/blender/blenkernel/intern/lattice_deform_test.cc +++ b/source/blender/blenkernel/intern/lattice_deform_test.cc @@ -83,7 +83,7 @@ static void test_lattice_deform_free(LatticeDeformTestContext *ctx) TEST(lattice_deform_performance, performance_no_dvert_1) { const int32_t num_items = 1; - LatticeDeformTestContext ctx = {0}; + LatticeDeformTestContext ctx = {{{0}}}; RandomNumberGenerator rng; test_lattice_deform_init(&ctx, &rng, num_items); test_lattice_deform(&ctx, num_items); @@ -92,7 +92,7 @@ TEST(lattice_deform_performance, performance_no_dvert_1) TEST(lattice_deform_performance, performance_no_dvert_1000) { const int32_t num_items = 1000; - LatticeDeformTestContext ctx = {0}; + LatticeDeformTestContext ctx = {{{0}}}; RandomNumberGenerator rng; test_lattice_deform_init(&ctx, &rng, num_items); test_lattice_deform(&ctx, num_items); @@ -101,7 +101,7 @@ TEST(lattice_deform_performance, performance_no_dvert_1000) TEST(lattice_deform_performance, performance_no_dvert_10000) { const int32_t num_items = 10000; - LatticeDeformTestContext ctx = {0}; + LatticeDeformTestContext ctx = {{{0}}}; RandomNumberGenerator rng; test_lattice_deform_init(&ctx, &rng, num_items); test_lattice_deform(&ctx, num_items); @@ -110,7 +110,7 @@ TEST(lattice_deform_performance, performance_no_dvert_10000) TEST(lattice_deform_performance, performance_no_dvert_100000) { const int32_t num_items = 100000; - LatticeDeformTestContext ctx = {0}; + LatticeDeformTestContext ctx = {{{0}}}; RandomNumberGenerator rng; test_lattice_deform_init(&ctx, &rng, num_items); test_lattice_deform(&ctx, num_items); @@ -119,7 +119,7 @@ TEST(lattice_deform_performance, performance_no_dvert_100000) TEST(lattice_deform_performance, performance_no_dvert_1000000) { const int32_t num_items = 1000000; - LatticeDeformTestContext ctx = {0}; + LatticeDeformTestContext ctx = {{{0}}}; RandomNumberGenerator rng; test_lattice_deform_init(&ctx, &rng, num_items); test_lattice_deform(&ctx, num_items); @@ -128,11 +128,11 @@ TEST(lattice_deform_performance, performance_no_dvert_1000000) TEST(lattice_deform_performance, performance_no_dvert_10000000) { const int32_t num_items = 10000000; - LatticeDeformTestContext ctx = {0}; + LatticeDeformTestContext ctx = {{{0}}}; RandomNumberGenerator rng; test_lattice_deform_init(&ctx, &rng, num_items); test_lattice_deform(&ctx, num_items); test_lattice_deform_free(&ctx); } -} // namespace blender::bke::tests \ No newline at end of file +} // namespace blender::bke::tests diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc index 5f46f57c09a..c13321ed205 100644 --- a/source/blender/gpu/intern/gpu_shader.cc +++ b/source/blender/gpu/intern/gpu_shader.cc @@ -211,9 +211,9 @@ void Shader::print_log(Span sources, char *log, const char *stage, BLI_dynstr_appendf(dynstr, "%s%s%s: ", warn_col, "Warning", info_col); } /* Print the error itself. */ - BLI_dynstr_appendf(dynstr, info_col); + BLI_dynstr_append(dynstr, info_col); BLI_dynstr_nappend(dynstr, log_line, (line_end + 1) - log_line); - BLI_dynstr_appendf(dynstr, reset_col); + BLI_dynstr_append(dynstr, reset_col); /* Continue to next line. */ log_line = line_end + 1; last_error_line = error_line; diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc index 69289d7602e..5564cbbabae 100644 --- a/source/blender/gpu/opengl/gl_debug.cc +++ b/source/blender/gpu/opengl/gl_debug.cc @@ -122,7 +122,7 @@ static void APIENTRY debug_callback(GLenum UNUSED(source), } if (((LOG.type->flag & CLG_FLAG_USE) && (LOG.type->level >= clog_severity))) { - CLG_logf(LOG.type, clog_severity, debug_groups, "", message); + CLG_logf(LOG.type, clog_severity, debug_groups, "", "%s", message); if (severity == GL_DEBUG_SEVERITY_HIGH) { /* Focus on error message. */ if (use_color) { -- cgit v1.2.3