Cleanup: compiler warnings

This commit is contained in:
Brecht Van Lommel 2020-10-26 12:01:59 +01:00
parent 9969c2dd16
commit 6fc0d743f1
3 changed files with 10 additions and 10 deletions

View File

@ -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
} // namespace blender::bke::tests

View File

@ -211,9 +211,9 @@ void Shader::print_log(Span<const char *> 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;

View File

@ -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) {