platform: fixed initial value of m_thread in CThread
[deb_libcec.git] / src / lib / platform / threads / threads.h
index ead0ebdcb18c5e53525f60bb1882cdf9f12fabe6..36477708d4750e6c2e035ca739d067f06cdff26a 100644 (file)
@@ -42,17 +42,14 @@ namespace PLATFORM
         m_bStop(false),
         m_bRunning(false),
         m_bStopped(false),
-        m_thread(NULL) {}
+        m_thread(INVALID_THREAD_VALUE) {}
 
     virtual ~CThread(void)
     {
       StopThread(0);
-      void *retVal;
-      if (m_thread)
+      void *retVal = NULL;
+      if (m_thread != INVALID_THREAD_VALUE)
         ThreadsWait(m_thread, &retVal);
-      #if defined(__WINDOWS__)
-      (void *)retVal; //"unreferenced local variable" warning
-      #endif
     }
 
     static void *ThreadHandler(CThread *thread)