[gegl-gtk] Silence gcc warnings
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-gtk] Silence gcc warnings
- Date: Sat, 3 Sep 2011 15:36:00 +0000 (UTC)
commit c00f1760bb7334be9019edd20a80de2fe44b8834
Author: Massimo Valentini <mvalentini src gnome org>
Date: Sat Sep 3 17:19:34 2011 +0200
Silence gcc warnings
annoying on x86_64 where pointers are wider than int
and conversions caused by implicit declarations might
cause crash.
examples/gegl-gtk-basic.c | 1 +
examples/gegl-gtk-display-op.c | 1 +
operations/gegl-gtk-display.c | 1 +
tests/test-view.c | 5 +++--
4 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/examples/gegl-gtk-basic.c b/examples/gegl-gtk-basic.c
index ea7f3cb..1d970c2 100644
--- a/examples/gegl-gtk-basic.c
+++ b/examples/gegl-gtk-basic.c
@@ -17,6 +17,7 @@
*/
#include <string.h>
+#include <stdlib.h>
#include <glib.h>
#include <gegl.h>
#include <gtk/gtk.h>
diff --git a/examples/gegl-gtk-display-op.c b/examples/gegl-gtk-display-op.c
index f0bba61..903fd5c 100644
--- a/examples/gegl-gtk-display-op.c
+++ b/examples/gegl-gtk-display-op.c
@@ -17,6 +17,7 @@
*/
#include <string.h>
+#include <stdlib.h>
#include <glib.h>
#include <gegl.h>
diff --git a/operations/gegl-gtk-display.c b/operations/gegl-gtk-display.c
index cf4804d..3bc41ca 100644
--- a/operations/gegl-gtk-display.c
+++ b/operations/gegl-gtk-display.c
@@ -98,6 +98,7 @@ set_window_attributes (GeglOperation *operation, const GeglRectangle *result)
}
else
{
+ const gchar *gegl_node_get_debug_name (GeglNode *node);
gtk_window_set_title (GTK_WINDOW (priv->window),
gegl_node_get_debug_name (gegl_node_get_producer(operation->node, "input", NULL))
);
diff --git a/tests/test-view.c b/tests/test-view.c
index e427668..5be1dff 100644
--- a/tests/test-view.c
+++ b/tests/test-view.c
@@ -3,10 +3,11 @@
#include <gegl-gtk-view.h>
#include <gegl.h>
+#include <string.h>
gboolean
test_utils_display_is_set () {
- return g_getenv ("DISPLAY");
+ return g_getenv ("DISPLAY") != NULL;
}
void
@@ -212,7 +213,7 @@ main (int argc, char **argv) {
/* Currently all tests depend on having a display server */
if (!test_utils_display_is_set()) {
g_printf("%s", "Warning: Skipping tests due to missing display server.\n");
- exit(0);
+ return 0;
}
g_thread_init(NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]