[glib] gthread.c: Declare variable at start of block
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gthread.c: Declare variable at start of block
- Date: Sun, 25 Sep 2011 01:09:07 +0000 (UTC)
commit 2b391940c090b050c6a4ec30fabb4a1c49207046
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Sep 23 13:37:08 2011 +0800
gthread.c: Declare variable at start of block
This is so that C89 compilers will not complain.
glib/gthread.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/glib/gthread.c b/glib/gthread.c
index bd83344..e30b396 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -667,6 +667,7 @@ void
g_thread_init_glib (void)
{
static gboolean already_done;
+ GRealThread* main_thread;
if (already_done)
return;
@@ -676,7 +677,7 @@ g_thread_init_glib (void)
/* We let the main thread (the one that calls g_thread_init) inherit
* the static_private data set before calling g_thread_init
*/
- GRealThread* main_thread = (GRealThread*) g_thread_self ();
+ main_thread = (GRealThread*) g_thread_self ();
/* setup the basic threading system */
g_threads_got_initialized = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]