Compiler warning fixes.

g_thread_init is automatically called since 2.32 (and deprecated since 2.35).
g_type_init is automatically called since 2.36 and will be deprecated in the
future.
This commit is contained in:
Aleric Inglewood
2014-07-11 16:54:06 +02:00
parent a4b3c3d1ad
commit 6ccca51fee
6 changed files with 23 additions and 2 deletions

View File

@@ -133,11 +133,13 @@ LLAppViewerLinux::~LLAppViewerLinux()
bool LLAppViewerLinux::init()
{
#if !GLIB_CHECK_VERSION(2, 32, 0)
// g_thread_init() must be called before *any* use of glib, *and*
// before any mutexes are held, *and* some of our third-party
// libraries likes to use glib functions; in short, do this here
// really early in app startup!
if (!g_thread_supported ()) g_thread_init (NULL);
#endif
bool success = LLAppViewer::init();
@@ -277,7 +279,9 @@ bool LLAppViewerLinux::initSLURLHandler()
return false; // failed
}
#if !GLIB_CHECK_VERSION(2, 36, 0)
g_type_init();
#endif
//ViewerAppAPI *api_server = (ViewerAppAPI*)
g_object_new(viewerappapi_get_type(), NULL);
@@ -297,7 +301,9 @@ bool LLAppViewerLinux::sendURLToOtherInstance(const std::string& url)
DBusGConnection *bus;
GError *error = NULL;
#if !GLIB_CHECK_VERSION(2, 36, 0)
g_type_init();
#endif
bus = lldbus_g_bus_get (DBUS_BUS_SESSION, &error);
if (bus)