Skip to contentSkip to conversation

src/main.c: removed call to g_thread_init

PATCH In review Giacinto Cifelli 2 participants 3 messages Sep 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 src/main.c: removed call to g_thread_init

according to g_thread documentation, this call is no longer needed, and starting from g_thread version 2.32 it must not be used

---
 src/main.c | 5 -----
 1 file changed, 5 deletions(-)
src/main.c +0 -5
index 2d359dd..d8a06ba 100644
@@ -211,11 +211,6 @@ int main(int argc, char **argv)
 	struct ell_event_source *source;
 #endif
 
-#ifdef NEED_THREADS
-	if (g_thread_supported() == FALSE)
-		g_thread_init(NULL);
-#endif
-
 	context = g_option_context_new(NULL);
 	g_option_context_add_main_entries(context, options, NULL);
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 tools/auto-enable.c and tools/huawei-audio.c: removed calls to g_thread_init

---
 tools/auto-enable.c  | 5 -----
 tools/huawei-audio.c | 5 -----
 2 files changed, 10 deletions(-)
tools/auto-enable.c +0 -5
index 87fb0a8..5195aaa 100644
@@ -492,11 +492,6 @@ int main(int argc, char **argv)
 	guint watch;
 	struct sigaction sa;
 
-#ifdef NEED_THREADS
-	if (g_thread_supported() == FALSE)
-		g_thread_init(NULL);
-#endif
-
 	context = g_option_context_new(NULL);
 	g_option_context_add_main_entries(context, options, NULL);
 
tools/huawei-audio.c +0 -5
index 9997a58..10b599f 100644
@@ -775,11 +775,6 @@ int main(int argc, char **argv)
 	guint watch;
 	struct sigaction sa;
 
-#ifdef NEED_THREADS
-	if (g_thread_supported() == FALSE)
-		g_thread_init(NULL);
-#endif
-
 	context = g_option_context_new(NULL);
 	g_option_context_add_main_entries(context, options, NULL);
 
Signature · 1 line
1.9.1
#2 lore raw
In reply to Giacinto Cifelli

Hi Giacinto,

Quoted 6 lines · Giacinto Cifelli

according to g_thread documentation, this call is no longer needed, and starting from g_thread version 2.32 it must not be used

---
  src/main.c | 5 -----
  1 file changed, 5 deletions(-)

Both applied after tweaking the commit messages.

Regards,
-Denis