[Pkg-telepathy-commits] [libnice] 94/265: tests: Remove redundant GLIB_CHECK_VERSION checks

Simon McVittie smcv at debian.org
Wed May 14 12:04:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository libnice.

commit b222b1bff3950e162a621e199c6897206fa45a4e
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Mon Jan 20 12:07:18 2014 +0000

    tests: Remove redundant GLIB_CHECK_VERSION checks
    
    Since we define GLIB_VERSION_MIN_REQUIRED, GLib will not emit deprecated
    function call warnings for functions like g_type_init() or
    g_thread_init().
---
 tests/test-add-remove-stream.c    | 2 --
 tests/test-build-io-stream.c      | 4 ----
 tests/test-dribble.c              | 2 --
 tests/test-fallback.c             | 2 --
 tests/test-fullmode.c             | 2 --
 tests/test-io-stream-cancelling.c | 4 ----
 tests/test-io-stream-closing.c    | 4 ----
 tests/test-io-stream-pollable.c   | 4 ----
 tests/test-io-stream-thread.c     | 4 ----
 tests/test-mainloop.c             | 2 --
 tests/test-restart.c              | 2 --
 tests/test-send-recv.c            | 4 ----
 tests/test-thread.c               | 2 --
 tests/test.c                      | 2 --
 14 files changed, 40 deletions(-)

diff --git a/tests/test-add-remove-stream.c b/tests/test-add-remove-stream.c
index dfb25a1..5ed3463 100644
--- a/tests/test-add-remove-stream.c
+++ b/tests/test-add-remove-stream.c
@@ -55,9 +55,7 @@ main (void)
 #endif
   nice_address_init (&addr);
   g_type_init ();
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init (NULL);
-#endif
 
   if (!nice_address_set_from_string (&addr, "127.0.0.1"))
     g_assert_not_reached ();
diff --git a/tests/test-build-io-stream.c b/tests/test-build-io-stream.c
index 386ffd0..45da124 100644
--- a/tests/test-build-io-stream.c
+++ b/tests/test-build-io-stream.c
@@ -469,12 +469,8 @@ main (void)
   WSAStartup (0x0202, &w);
 #endif
   nice_address_init (&addr);
-#if !GLIB_CHECK_VERSION(2, 36, 0)
   g_type_init ();
-#endif
-#if !GLIB_CHECK_VERSION(2, 31, 8)
   g_thread_init (NULL);
-#endif
 
   g_assert (nice_address_set_from_string (&addr, "127.0.0.1"));
 
diff --git a/tests/test-dribble.c b/tests/test-dribble.c
index f385315..f750dbc 100644
--- a/tests/test-dribble.c
+++ b/tests/test-dribble.c
@@ -206,9 +206,7 @@ int main (void)
 #endif
 
   g_type_init ();
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init (NULL);
-#endif
 
   global_mainloop = g_main_loop_new (NULL, FALSE);
 
diff --git a/tests/test-fallback.c b/tests/test-fallback.c
index 007fa7b..f97cb0d 100644
--- a/tests/test-fallback.c
+++ b/tests/test-fallback.c
@@ -492,9 +492,7 @@ int main (void)
   WSAStartup(0x0202, &w);
 #endif
   g_type_init ();
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init (NULL);
-#endif
 
   global_mainloop = g_main_loop_new (NULL, FALSE);
 
diff --git a/tests/test-fullmode.c b/tests/test-fullmode.c
index c47dde3..bd56543 100644
--- a/tests/test-fullmode.c
+++ b/tests/test-fullmode.c
@@ -809,9 +809,7 @@ int main (void)
   WSAStartup(0x0202, &w);
 #endif
   g_type_init ();
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init(NULL);
-#endif
 
   global_mainloop = g_main_loop_new (NULL, FALSE);
 
diff --git a/tests/test-io-stream-cancelling.c b/tests/test-io-stream-cancelling.c
index efcb60c..05cbaa0 100644
--- a/tests/test-io-stream-cancelling.c
+++ b/tests/test-io-stream-cancelling.c
@@ -111,12 +111,8 @@ int main (void)
   WSADATA w;
   WSAStartup (0x0202, &w);
 #endif
-#if !GLIB_CHECK_VERSION(2, 36, 0)
   g_type_init ();
-#endif
-#if !GLIB_CHECK_VERSION(2, 31, 8)
   g_thread_init (NULL);
-#endif
 
   l_data = g_malloc0 (sizeof (CancellationData));
   l_data->cancellable = g_cancellable_new ();
diff --git a/tests/test-io-stream-closing.c b/tests/test-io-stream-closing.c
index c3318e1..1803a72 100644
--- a/tests/test-io-stream-closing.c
+++ b/tests/test-io-stream-closing.c
@@ -153,12 +153,8 @@ int main (void)
   WSADATA w;
   WSAStartup (0x0202, &w);
 #endif
-#if !GLIB_CHECK_VERSION(2, 36, 0)
   g_type_init ();
-#endif
-#if !GLIB_CHECK_VERSION(2, 31, 8)
   g_thread_init (NULL);
-#endif
 
   l_data = g_malloc0 (sizeof (ClosingData));
   r_data = g_malloc0 (sizeof (ClosingData));
diff --git a/tests/test-io-stream-pollable.c b/tests/test-io-stream-pollable.c
index e448460..510145d 100644
--- a/tests/test-io-stream-pollable.c
+++ b/tests/test-io-stream-pollable.c
@@ -158,12 +158,8 @@ int main (void)
   WSADATA w;
   WSAStartup (0x0202, &w);
 #endif
-#if !GLIB_CHECK_VERSION(2, 36, 0)
   g_type_init ();
-#endif
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init (NULL);
-#endif
 
   l_data = g_malloc0 (sizeof (ThreadData));
   r_data = g_malloc0 (sizeof (ThreadData));
diff --git a/tests/test-io-stream-thread.c b/tests/test-io-stream-thread.c
index 7830a49..db14fe4 100644
--- a/tests/test-io-stream-thread.c
+++ b/tests/test-io-stream-thread.c
@@ -124,12 +124,8 @@ int main (void)
   WSADATA w;
   WSAStartup (0x0202, &w);
 #endif
-#if !GLIB_CHECK_VERSION(2, 36, 0)
   g_type_init ();
-#endif
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init (NULL);
-#endif
 
   l_data = g_malloc0 (sizeof (ThreadData));
   r_data = g_malloc0 (sizeof (ThreadData));
diff --git a/tests/test-mainloop.c b/tests/test-mainloop.c
index f5aaa55..e790ec7 100644
--- a/tests/test-mainloop.c
+++ b/tests/test-mainloop.c
@@ -73,9 +73,7 @@ main (void)
 
   nice_address_init (&addr);
   g_type_init ();
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init(NULL);
-#endif
 
   loop = g_main_loop_new (NULL, FALSE);
 
diff --git a/tests/test-restart.c b/tests/test-restart.c
index c46b459..425f825 100644
--- a/tests/test-restart.c
+++ b/tests/test-restart.c
@@ -402,9 +402,7 @@ int main (void)
   WSAStartup(0x0202, &w);
 #endif
   g_type_init ();
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init(NULL);
-#endif
 
   global_mainloop = g_main_loop_new (NULL, FALSE);
 
diff --git a/tests/test-send-recv.c b/tests/test-send-recv.c
index 760dcf6..701d921 100644
--- a/tests/test-send-recv.c
+++ b/tests/test-send-recv.c
@@ -808,12 +808,8 @@ main (int argc, char *argv[])
   WSADATA w;
   WSAStartup (0x0202, &w);
 #endif
-#if !GLIB_CHECK_VERSION(2, 36, 0)
   g_type_init ();
-#endif
-#if !GLIB_CHECK_VERSION(2, 31, 8)
   g_thread_init (NULL);
-#endif
 
   if (!long_mode) {
     /* Quick mode. Just test each of the stream APIs in reliable and
diff --git a/tests/test-thread.c b/tests/test-thread.c
index 1020645..57270cd 100644
--- a/tests/test-thread.c
+++ b/tests/test-thread.c
@@ -197,9 +197,7 @@ int main (void)
   WSAStartup(0x0202, &w);
 #endif
   g_type_init ();
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init(NULL);
-#endif
 
   lmainctx = g_main_context_new ();
   rmainctx = g_main_context_new ();
diff --git a/tests/test.c b/tests/test.c
index ea0b0ea..edef196 100644
--- a/tests/test.c
+++ b/tests/test.c
@@ -62,9 +62,7 @@ main (void)
   nice_address_init (&addr_remote);
   g_type_init ();
 
-#if !GLIB_CHECK_VERSION(2,31,8)
   g_thread_init(NULL);
-#endif
 
   g_assert (nice_address_set_from_string (&addr_local, "127.0.0.1"));
   g_assert (nice_address_set_from_string (&addr_remote, "127.0.0.1"));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git



More information about the Pkg-telepathy-commits mailing list