obex: Fix warnings cause by using of deprecated APIs
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 2 Apr 2021 17:50:53 +0000 (10:50 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
obexd/src/main.c: In function 'main':
obexd/src/main.c:237:13: warning: Deprecated pre-processor symbol
  237 |  if (g_thread_supported() == FALSE)
      |             ^~~~~~~~~~~~~~~~~~~~~~~
obexd/src/main.c:238:3: warning: 'g_thread_init' is deprecated
[-Wdeprecated-declarations]
  238 |   g_thread_init(NULL);
      |   ^~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:111,
                 from obexd/src/main.c:31:
/usr/include/glib-2.0/glib/deprecated/gthread.h:261:10: note: declared here
  261 | void     g_thread_init                   (gpointer vtable);
      |          ^~~~~~~~~~~~~

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
obexd/plugins/phonebook-tracker.c
obexd/src/main.c

index f1b0c76..b175c8b 100755 (executable)
@@ -1421,7 +1421,6 @@ done:
 
 int phonebook_init(void)
 {
-       g_thread_init(NULL);
        g_type_init();
 
        return 0;
index 60c385d..12cdcca 100755 (executable)
@@ -240,11 +240,6 @@ int main(int argc, char *argv[])
        GError *err = NULL;
        guint signal;
 
-#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);