[gtk+] tests: Strip newlines from g_warning and g_error
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Strip newlines from g_warning and g_error
- Date: Sun, 28 Feb 2016 17:24:13 +0000 (UTC)
commit 7bd1012e51e47c939572a584fbfc65be45596168
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 28 12:21:29 2016 -0500
tests: Strip newlines from g_warning and g_error
g_logv adds one for us already.
tests/gtkoffscreenbox.c | 2 +-
tests/scrolling-performance.c | 2 +-
tests/testglarea.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index f0a8225..5f474ac 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -386,7 +386,7 @@ gtk_offscreen_box_add (GtkContainer *container,
else if (!offscreen_box->child2)
gtk_offscreen_box_add2 (offscreen_box, widget);
else
- g_warning ("GtkOffscreenBox cannot have more than 2 children\n");
+ g_warning ("GtkOffscreenBox cannot have more than 2 children");
}
void
diff --git a/tests/scrolling-performance.c b/tests/scrolling-performance.c
index 5b6aac2..15fa1ef 100644
--- a/tests/scrolling-performance.c
+++ b/tests/scrolling-performance.c
@@ -17,7 +17,7 @@ create_widget_factory_content (void)
"../demos/widget-factory/widget-factory.ui",
&error);
if (error != NULL)
- g_error ("Failed to create widgets: %s\n", error->message);
+ g_error ("Failed to create widgets: %s", error->message);
result = GTK_WIDGET (gtk_builder_get_object (builder, "box1"));
g_object_ref (result);
diff --git a/tests/testglarea.c b/tests/testglarea.c
index 310a244..764e231 100644
--- a/tests/testglarea.c
+++ b/tests/testglarea.c
@@ -66,7 +66,7 @@ create_shader (int type, const char *src)
buffer = g_malloc (log_len + 1);
glGetShaderInfoLog (shader, log_len, NULL, buffer);
- g_warning ("Compile failure in %s shader:\n%s\n",
+ g_warning ("Compile failure in %s shader:\n%s",
type == GL_VERTEX_SHADER ? "vertex" : "fragment",
buffer);
@@ -158,7 +158,7 @@ init_shaders (const char *vertex_shader_code,
buffer = g_malloc (log_len + 1);
glGetProgramInfoLog (program, log_len, NULL, buffer);
- g_warning ("Linking failure:\n%s\n", buffer);
+ g_warning ("Linking failure:\n%s", buffer);
g_free (buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]