VirtualBox

Changeset 62675 in vbox for trunk/src


Ignore:
Timestamp:
Jul 29, 2016 11:19:16 AM (8 years ago)
Author:
vboxsync
Message:

SUPLib: Two error path fixes and lots of warnings.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r62665 r62675  
    136136static bool                     g_fSupportsPageAllocNoKernel = true;
    137137/** Fake mode indicator. (~0 at first, 0 or 1 after first test) */
    138 uint32_t                        g_uSupFakeMode = ~0;
     138uint32_t                        g_uSupFakeMode = UINT32_MAX;
    139139
    140140
     
    549549            ASMAtomicWriteNullPtr((void * volatile *)&g_pSUPGlobalInfoPage);
    550550            ASMAtomicWriteNullPtr((void * volatile *)&g_pSUPGlobalInfoPageR0);
    551             ASMAtomicWriteSize(&g_HCPhysSUPGlobalInfoPage, NIL_RTHCPHYS);
     551            ASMAtomicWriteU64(&g_HCPhysSUPGlobalInfoPage, NIL_RTHCPHYS);
    552552            /* just a little safe guard against threads using the page. */
    553553            RTThreadSleep(50);
     
    15221522    AssertReturn(!phFile, VERR_NOT_IMPLEMENTED); /** @todo Implement this. The deal is that we make sure the
    15231523                                                     file is the same we verified after opening it. */
     1524    RT_NOREF2(pszFilename, pszMsg);
    15241525
    15251526    /*
     
    16371638    return rc;
    16381639#else
     1640    RT_NOREF1(pszFilename);
    16391641    return VINF_SUCCESS;
    16401642#endif
     
    20872089DECLASM(void) suplibTracerFireProbe(PVTGPROBELOC pProbeLoc, PSUPTRACERUMODFIREPROBE pReq)
    20882090{
     2091    RT_NOREF1(pProbeLoc);
     2092
    20892093    pReq->Hdr.u32Cookie         = g_u32Cookie;
    20902094    pReq->Hdr.u32SessionCookie  = g_u32SessionCookie;
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp

    r62490 r62675  
    101101    va_copy(vaCopy, va);
    102102    AssertFatalMsgFailed(("%s (rc=%Rrc): %N", pszWhere, rc, pszMsgFmt, &vaCopy));
    103     va_end(vaCopy);
    104103    NOREF(enmWhat);
     104    /* not reached */
    105105}
    106106
     
    111111    va_start(va, pszMsgFmt);
    112112    supR3HardenedFatalMsgV(pszWhere, enmWhat, rc, pszMsgFmt, va);
    113     va_end(va);
     113    /* not reached */
    114114}
    115115
     
    120120    va_copy(vaCopy, va);
    121121    AssertFatalMsgFailed(("%N", pszFormat, &vaCopy));
    122     va_end(vaCopy);
     122    /* not reached */
    123123}
    124124
     
    129129    va_start(va, pszFormat);
    130130    supR3HardenedFatalV(pszFormat, va);
    131     va_end(va);
     131    /* not reached */
    132132}
    133133
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp

    r62490 r62675  
    620620
    621621# else  /* Not checking signatures. */
     622    RT_NOREF4(pFile, pVerified, fFatal, fLeaveFileOpen);
    622623    return VINF_SUCCESS;
    623624# endif /* Not checking signatures. */
     
    882883#ifndef RT_OS_DARWIN
    883884    size_t const    cchProgNameDll = cchProgNameExe;
     885    NOREF(fMainFlags);
    884886#else
    885887    size_t const    cchProgNameDll = fMainFlags & SUPSECMAIN_FLAGS_OSX_VM_APP
     
    12471249    /** @todo Windows hardening. */
    12481250    pFsObjState->chTodo = 0;
     1251    RT_NOREF2(pszPath, pErrInfo);
    12491252    return VINF_SUCCESS;
    12501253
     
    12891292    /** @todo Windows hardening. */
    12901293    pFsObjState->chTodo = 0;
     1294    RT_NOREF3(hNative, pszPath, pErrInfo);
    12911295    return VINF_SUCCESS;
    12921296
     
    13251329#if defined(RT_OS_WINDOWS)
    13261330    /** @todo Windows hardening. */
     1331    RT_NOREF4(pFsObjState1, pFsObjState2, pszPath, pErrInfo);
    13271332    return VINF_SUCCESS;
    13281333
    13291334#elif defined(RT_OS_OS2)
     1335    RT_NOREF4(pFsObjState1, pFsObjState2, pszPath, pErrInfo);
    13301336    return VINF_SUCCESS;
    13311337
     
    15101516#if defined(RT_OS_WINDOWS)
    15111517    /** @todo Windows hardening. */
     1518    RT_NOREF5(pszDirPath, cchDirPath, pFsObjState, fRecursive, pErrInfo);
    15121519    return VINF_SUCCESS;
    15131520
    15141521#elif defined(RT_OS_OS2)
    15151522    /* No hardening here - it's a single user system. */
     1523    RT_NOREF5(pszDirPath, cchDirPath, pFsObjState, fRecursive, pErrInfo);
    15161524    return VINF_SUCCESS;
    15171525
     
    17341742        }
    17351743        else
     1744        {
    17361745            rc = RTErrInfoSetF(pErrInfo, rc, "Error converting '%s' to UTF-16: %Rrc", pszFilename, rc);
     1746            hVerify = INVALID_HANDLE_VALUE;
     1747        }
    17371748    }
    17381749    else
     
    17601771        rc = supHardenedWinVerifyImageByHandleNoName(hVerify, fFlags, pErrInfo);
    17611772#  endif
     1773# else
     1774        RT_NOREF1(fMaybe3rdParty);
    17621775# endif
    17631776        NtClose(hVerify);
     
    17681781    if (RT_FAILURE(rc))
    17691782        return rc;
     1783#else
     1784    RT_NOREF1(fMaybe3rdParty);
    17701785#endif
    17711786
  • trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp

    r62490 r62675  
    260260                pErrInfo->pszMsg[0] = '\0';
    261261        }
     262#else
     263        RT_NOREF1(penmWhat);
    262264#endif
    263265        return rc;
     
    457459        CloseServiceHandle(hSMgr);
    458460    }
     461    else
     462        rc = RTErrConvertFromWin32(dwErr);
    459463    return rc;
    460464}
     
    570574        SERVICE_STATUS Status;
    571575        BOOL fRc = QueryServiceStatus(hService, &Status);
    572         Assert(fRc);
     576        Assert(fRc); NOREF(fRc);
    573577        if (Status.dwCurrentState == SERVICE_RUNNING)
    574578            rc = VINF_ALREADY_INITIALIZED;
     
    652656int suplibOsIOCtl(PSUPLIBDATA pThis, uintptr_t uFunction, void *pvReq, size_t cbReq)
    653657{
     658    RT_NOREF1(cbReq);
     659
    654660    /*
    655661     * Issue the device I/O control.
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