VirtualBox

Changeset 63159 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Aug 8, 2016 12:43:42 PM (8 years ago)
Author:
vboxsync
Message:

Main: More uninitialized variable warnings.

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r62372 r63159  
    358358
    359359    RecvDataTask *pTask = NULL;
    360     RTTHREAD threadRcv;
     360    RTTHREAD hThreadRcv;
    361361    int rc = S_OK;
    362362
     
    381381        /* This function delete pTask in case of exceptions,
    382382         * so there is no need in the call of delete operator. */
    383         hr = pTask->createThread(&threadRcv);
    384 
    385     }
    386     catch(std::bad_alloc &)
     383        hr = pTask->createThread(&hThreadRcv);
     384
     385    }
     386    catch (std::bad_alloc &)
    387387    {
    388388        hr = setError(E_OUTOFMEMORY);
    389     }
    390     catch(...)
     389        hThreadRcv = NIL_RTTHREAD;
     390    }
     391    catch (...)
    391392    {
    392393        LogRel2(("DnD: Could not create thread for RecvDataTask \n"));
    393394        hr = E_FAIL;
     395        hThreadRcv = NIL_RTTHREAD;
    394396    }
    395397
    396398    if (SUCCEEDED(hr))
    397399    {
    398         rc = RTThreadUserWait(threadRcv, 30 * 1000 /* 30s timeout */);
     400        rc = RTThreadUserWait(hThreadRcv, 30 * 1000 /* 30s timeout */);
    399401        if (RT_SUCCESS(rc))
    400402        {
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r62485 r63159  
    627627    SendDataTask *pTask = NULL;
    628628    PSENDDATACTX pSendCtx = NULL;
    629     RTTHREAD threadSnd;
     629    RTTHREAD rcThreadSend;
    630630    int rc = S_OK;
    631631
     
    653653        //this function delete pTask in case of exceptions, so there is no need in the call of delete operator
    654654        //pSendCtx is deleted in the pTask destructor
    655         hr = pTask->createThread(&threadSnd);
    656 
    657     }
    658     catch(std::bad_alloc &)
     655        hr = pTask->createThread(&rcThreadSend);
     656
     657    }
     658    catch (std::bad_alloc &)
    659659    {
    660660        hr = setError(E_OUTOFMEMORY);
    661     }
    662     catch(...)
     661        rcThreadSend = NIL_RTTHREAD;
     662    }
     663    catch (...)
    663664    {
    664665        LogRel2(("DnD: Could not create thread for SendDataTask \n"));
    665666        hr = E_FAIL;
     667        rcThreadSend = NIL_RTTHREAD;
    666668    }
    667669
    668670    if (SUCCEEDED(hr))
    669671    {
    670         rc = RTThreadUserWait(threadSnd, 30 * 1000 /* 30s timeout */);
     672        rc = RTThreadUserWait(rcThreadSend, 30 * 1000 /* 30s timeout */);
    671673        if (RT_SUCCESS(rc))
    672674        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette