VirtualBox

Ignore:
Timestamp:
Feb 19, 2024 2:21:15 PM (12 months ago)
Author:
vboxsync
Message:

include/VBox/errorprint.h,FE/VBoxAutostart: Some warning fixes, bugref:3409

Location:
trunk/src/VBox/Frontends/VBoxAutostart
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-posix.cpp

    r101227 r103449  
    226226
    227227    /* complete the line. */
    228     LONG iRc = E_FAIL;
     228    LONG iRc = (LONG)E_FAIL;
    229229    hrc = progress->COMGETTER(ResultCode)(&iRc);
    230230    if (SUCCEEDED(hrc))
     
    239239            RTStrmPrintf(g_pStdErr, "Progress state: %Rhrc\n", iRc);
    240240        }
    241         hrc = iRc;
     241        hrc = (HRESULT)iRc;
    242242    }
    243243    else
  • trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStart.cpp

    r98103 r103449  
    105105        for (size_t i = 0; i < machines.size(); ++i)
    106106        {
    107             if (machines[i])
     107            ComPtr<IMachine> pMachine = machines[i];
     108
     109            if (pMachine.isNotNull())
    108110            {
    109111                Bstr strName;
    110                 CHECK_ERROR_BREAK(machines[i], COMGETTER(Name)(strName.asOutParam()));
     112                CHECK_ERROR_BREAK(pMachine, COMGETTER(Name)(strName.asOutParam()));
    111113
    112114                BOOL fAccessible;
    113                 CHECK_ERROR_BREAK(machines[i], COMGETTER(Accessible)(&fAccessible));
     115                CHECK_ERROR_BREAK(pMachine, COMGETTER(Accessible)(&fAccessible));
    114116                if (!fAccessible)
    115117                {
     
    121123
    122124                BOOL fAutostart;
    123                 CHECK_ERROR_BREAK(machines[i], COMGETTER(AutostartEnabled)(&fAutostart));
     125                CHECK_ERROR_BREAK(pMachine, COMGETTER(AutostartEnabled)(&fAutostart));
    124126                if (fAutostart)
    125127                {
    126                     CHECK_ERROR_BREAK(machines[i], COMGETTER(Id)(autostartVM.strId.asOutParam()));
    127                     CHECK_ERROR_BREAK(machines[i], COMGETTER(AutostartDelay)(&autostartVM.uStartupDelay));
     128                    CHECK_ERROR_BREAK(pMachine, COMGETTER(Id)(autostartVM.strId.asOutParam()));
     129                    CHECK_ERROR_BREAK(pMachine, COMGETTER(AutostartDelay)(&autostartVM.uStartupDelay));
    128130
    129131                    listVM.push_back(autostartVM);
  • trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStop.cpp

    r98103 r103449  
    135135        for (size_t i = 0; i < machines.size(); ++i)
    136136        {
    137             if (machines[i])
     137            ComPtr<IMachine> pMachine = machines[i];
     138
     139            if (pMachine.isNotNull())
    138140            {
    139141                Bstr strName;
    140                 CHECK_ERROR_BREAK(machines[i], COMGETTER(Name)(strName.asOutParam()));
     142                CHECK_ERROR_BREAK(pMachine, COMGETTER(Name)(strName.asOutParam()));
    141143
    142144                BOOL fAccessible;
    143                 CHECK_ERROR_BREAK(machines[i], COMGETTER(Accessible)(&fAccessible));
     145                CHECK_ERROR_BREAK(pMachine, COMGETTER(Accessible)(&fAccessible));
    144146                if (!fAccessible)
    145147                {
     
    151153
    152154                AutostopType_T enmAutostopType;
    153                 CHECK_ERROR_BREAK(machines[i], COMGETTER(AutostopType)(&enmAutostopType));
     155                CHECK_ERROR_BREAK(pMachine, COMGETTER(AutostopType)(&enmAutostopType));
    154156                if (enmAutostopType != AutostopType_Disabled)
    155157                {
    156                     CHECK_ERROR_BREAK(machines[i], COMGETTER(Id)(autostopVM.strId.asOutParam()));
     158                    CHECK_ERROR_BREAK(pMachine, COMGETTER(Id)(autostopVM.strId.asOutParam()));
    157159                    autostopVM.enmAutostopType = enmAutostopType;
    158160
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