Deprecate g_thread_create_full()
[platform/upstream/glib.git] / tests / timeloop.c
index cec5700..457e74d 100644 (file)
@@ -1,3 +1,6 @@
+#undef G_DISABLE_ASSERT
+#undef G_LOG_DOMAIN
+
 #include <errno.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -12,7 +15,7 @@ static int n_active_children;
 static int n_iters = 10000;
 static GMainLoop *loop;
 
-void
+static void
 io_pipe (GIOChannel **channels)
 {
   int fds[2];
@@ -27,11 +30,11 @@ io_pipe (GIOChannel **channels)
   channels[1] = g_io_channel_unix_new (fds[1]);
 }
 
-gboolean
+static gboolean
 read_all (GIOChannel *channel, char *buf, int len)
 {
-  int bytes_read = 0;
-  int count;
+  gsize bytes_read = 0;
+  gsize count;
   GIOError err;
 
   while (bytes_read < len)
@@ -51,11 +54,11 @@ read_all (GIOChannel *channel, char *buf, int len)
   return TRUE;
 }
 
-gboolean
+static gboolean
 write_all (GIOChannel *channel, char *buf, int len)
 {
-  int bytes_written = 0;
-  int count;
+  gsize bytes_written = 0;
+  gsize count;
   GIOError err;
 
   while (bytes_written < len)
@@ -70,7 +73,7 @@ write_all (GIOChannel *channel, char *buf, int len)
   return TRUE;
 }
 
-void
+static void
 run_child (GIOChannel *in_channel, GIOChannel *out_channel)
 {
   int i;
@@ -94,7 +97,7 @@ run_child (GIOChannel *in_channel, GIOChannel *out_channel)
   exit (0);
 }
 
-gboolean
+static gboolean
 input_callback (GIOChannel   *source,
                GIOCondition  condition,
                gpointer      data)
@@ -130,8 +133,8 @@ input_callback (GIOChannel   *source,
     }
 }
 
-void
-create_child ()
+static void
+create_child (void)
 {
   int pid;
   GIOChannel *in_channels[2];