From: Alexander Alekhin Date: Fri, 25 Nov 2016 13:16:25 +0000 (+0300) Subject: highgui: g_thread_create deprecated warning X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~16^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90da5933165c4bc1b5cc91547bb5123a01478cfd;p=platform%2Fupstream%2Fopencv.git highgui: g_thread_create deprecated warning --- diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index bb69224..cfdf3e8 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/modules/highgui/src/window_gtk.cpp @@ -480,9 +480,13 @@ CV_IMPL int cvStartWindowThread(){ // conditional that indicates a key has been pressed cond_have_key = g_cond_new(); +#if !GLIB_CHECK_VERSION(2, 32, 0) // this is the window update thread window_thread = g_thread_create((GThreadFunc) icvWindowThreadLoop, NULL, TRUE, NULL); +#else + window_thread = g_thread_new("OpenCV window update", (GThreadFunc)icvWindowThreadLoop, NULL); +#endif } thread_started = window_thread!=NULL; return thread_started;