From 8b9361e75c59b9e6bc44d9330798db40a02089b5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 8 Mar 2017 15:51:02 +0900 Subject: [PATCH] tests: Don't print garbage GLView tends to print some random garbage when using the GLView Gears test. That's because we're allocating and printing a 0 byte buffer. Don't do that. --- src/bin/elementary/test_glview.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/elementary/test_glview.c b/src/bin/elementary/test_glview.c index beb291a..1a3432e 100644 --- a/src/bin/elementary/test_glview.c +++ b/src/bin/elementary/test_glview.c @@ -350,6 +350,7 @@ _print_gl_log(Evas_GL_API *gl, GLuint id) gl->glGetShaderiv(id, GL_INFO_LOG_LENGTH, &log_len); else if (gl->glIsProgram(id)) gl->glGetProgramiv(id, GL_INFO_LOG_LENGTH, &log_len); + if (!log_len) return; log_info = malloc(log_len * sizeof(char)); @@ -439,7 +440,8 @@ _del_gl(Evas_Object *obj) GLData *gld = evas_object_data_get(obj, "gld"); if (!gld) { - printf("Unable to get GLData. \n"); + printf("Unable to get GLData.\n"); + fflush(stdout); return; } Evas_GL_API *gl = gld->glapi; -- 2.7.4