[dconf] Suppress GLib deprecation warnings



commit c504631da4a13e621222564f6481b290c505c14d
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Nov 25 00:33:24 2013 -0500

    Suppress GLib deprecation warnings
    
    The testsuite is happily using g_test_trap_fork() and dconf only builds
    on POSIX anyway, so this isn't a problem.
    
    Add version macros to the top of the testcases that use this API to
    suppress the deprecation warnings.

 tests/dbus.c   |    2 ++
 tests/engine.c |    2 ++
 tests/shm.c    |    3 +++
 3 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/tests/dbus.c b/tests/dbus.c
index 8d564e6..fba0741 100644
--- a/tests/dbus.c
+++ b/tests/dbus.c
@@ -1,3 +1,5 @@
+#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36 /* Suppress deprecation warnings */
+
 #include <string.h>
 #include <glib.h>
 #include <stdlib.h>
diff --git a/tests/engine.c b/tests/engine.c
index 26bf487..2d44aeb 100644
--- a/tests/engine.c
+++ b/tests/engine.c
@@ -1,5 +1,7 @@
 #define _GNU_SOURCE
 
+#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36 /* Suppress deprecation warnings */
+
 #include "../engine/dconf-engine.h"
 #include "../engine/dconf-engine-profile.h"
 #include "dconf-mock.h"
diff --git a/tests/shm.c b/tests/shm.c
index 86e3b34..66e67a2 100644
--- a/tests/shm.c
+++ b/tests/shm.c
@@ -1,4 +1,7 @@
 #define _GNU_SOURCE
+
+#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36 /* Suppress deprecation warnings */
+
 #include "../common/dconf-paths.h"
 #include <glib/gstdio.h>
 #include <sys/stat.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]