[Mesa-dev] [RFC PATCH shader-db 1/2] run: don't expect incoming message to contain a newline

Ilia Mirkin imirkin at alum.mit.edu
Sun Nov 8 20:53:32 PST 2015


It seems a bit odd to expect a debug message to contain a newline --
what if you wanted to include something *after* the message, for
example. It makes more sense for the code actually printing to have the
newline rather than the string being passed around.
---
 run.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/run.c b/run.c
index 2c2a810..73e468d 100644
--- a/run.c
+++ b/run.c
@@ -209,7 +209,7 @@ callback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
     assert(severity == GL_DEBUG_SEVERITY_NOTIFICATION);
 
     const char *const *shader_name = userParam;
-    printf("%s - %s", *shader_name, message);
+    printf("%s - %s\n", *shader_name, message);
 }
 
 static unsigned shader_test_size = 1 << 15; /* next-pow-2(num shaders in db) */
-- 
2.4.10



More information about the mesa-dev mailing list