VirtualBox

Changeset 62663 in vbox for trunk


Ignore:
Timestamp:
Jul 28, 2016 11:01:05 PM (8 years ago)
Author:
vboxsync
Message:

RuntimeR0Drv: warnings

Location:
trunk/src/VBox/Runtime
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/memsafer-generic.cpp

    r62477 r62663  
    108108    *ppvNew = NULL;
    109109    AssertReturn(cb, VERR_INVALID_PARAMETER);
     110    RT_NOREF_PV(pszTag);
    110111
    111112    /*
  • trunk/src/VBox/Runtime/r0drv/alloc-ef-r0drv.cpp

    r62592 r62663  
    206206static DECLCALLBACK(size_t) rtR0MemEfWrite(void *pvArg, const char *pachChars, size_t cbChars)
    207207{
     208    RT_NOREF1(pvArg);
    208209    if (cbChars)
    209210    {
  • trunk/src/VBox/Runtime/r0drv/generic/threadctxhooks-r0drv-generic.cpp

    r62477 r62663  
    3636RTDECL(int) RTThreadCtxHookCreate(PRTTHREADCTXHOOK phCtxHook, uint32_t fFlags, PFNRTTHREADCTXHOOK pfnCallback, void *pvUser)
    3737{
    38     NOREF(phCtxHook);
    39     NOREF(pfnCallback);
    40     NOREF(pvUser);
     38    RT_NOREF4(phCtxHook, fFlags, pfnCallback, pvUser);
    4139    return VERR_NOT_SUPPORTED;
    4240}
  • trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp

    r62477 r62663  
    248248{
    249249    AssertMsgReturn(cb <= _1G, ("%#x\n", cb), VERR_OUT_OF_RANGE); /* for safe size_t -> ULONG */
     250    RT_NOREF1(fExecutable);
    250251
    251252    /*
     
    346347            __except(EXCEPTION_EXECUTE_HANDLER)
    347348            {
     349# ifdef LOG_ENABLED
    348350                NTSTATUS rcNt = GetExceptionCode();
    349351                Log(("rtR0MemObjNativeAllocLow: Exception Code %#x\n", rcNt));
     352# endif
    350353                /* nothing */
    351354            }
     
    380383{
    381384    AssertMsgReturn(cb <= _1G, ("%#x\n", cb), VERR_OUT_OF_RANGE); /* for safe size_t -> ULONG */
     385    RT_NOREF1(fExecutable);
    382386#ifdef IPRT_TARGET_NT4
    383387    if (uAlignment != PAGE_SIZE)
     
    690694     * MmCreateSection(SEC_RESERVE) + MmMapViewInSystemSpace perhaps?
    691695     */
     696    RT_NOREF4(ppMem, pvFixed, cb, uAlignment);
    692697    return VERR_NOT_SUPPORTED;
    693698}
     
    700705     * ZeCreateSection(SEC_RESERVE) + ZwMapViewOfSection perhaps?
    701706     */
     707    RT_NOREF5(ppMem, R3PtrFixed, cb, uAlignment, R0Process);
    702708    return VERR_NOT_SUPPORTED;
    703709}
     
    788794        __except(EXCEPTION_EXECUTE_HANDLER)
    789795        {
     796#ifdef LOG_ENABLED
    790797            NTSTATUS rcNt = GetExceptionCode();
    791798            Log(("rtR0MemObjNtMap: Exception Code %#x\n", rcNt));
     799#endif
    792800
    793801            /* nothing */
     
    849857DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt)
    850858{
     859#if 0
    851860    PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)pMem;
     861#endif
    852862    if (!g_fResolvedDynamicApis)
    853863        rtR0MemObjNtResolveDynamicApis();
     
    967977        return RTErrConvertFromNtStatus(rcNt);
    968978    }
     979#else
     980    RT_NOREF4(pMem, offSub, cbSub, fProt);
    969981#endif
    970982
  • trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp

    r62477 r62663  
    345345{
    346346    PRTMPARGS pArgs = (PRTMPARGS)DeferredContext;
     347    RT_NOREF3(Dpc, SystemArgument1, SystemArgument2);
    347348
    348349    ASMAtomicIncU32(&pArgs->cHits);
     
    453454    {
    454455        ASMAtomicIncS32(&pArgs->cRefs);
    455         BOOLEAN ret = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
    456         Assert(ret);
     456        BOOLEAN fRc = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
     457        Assert(fRc); NOREF(fRc);
    457458    }
    458459    else if (enmCpuid == RT_NT_CPUID_PAIR)
    459460    {
    460461        ASMAtomicIncS32(&pArgs->cRefs);
    461         BOOLEAN ret = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
    462         Assert(ret);
     462        BOOLEAN fRc = KeInsertQueueDpc(&paExecCpuDpcs[0], 0, 0);
     463        Assert(fRc); NOREF(fRc);
    463464
    464465        ASMAtomicIncS32(&pArgs->cRefs);
    465         ret = KeInsertQueueDpc(&paExecCpuDpcs[1], 0, 0);
    466         Assert(ret);
     466        fRc = KeInsertQueueDpc(&paExecCpuDpcs[1], 0, 0);
     467        Assert(fRc); NOREF(fRc);
    467468    }
    468469    else
     
    476477            {
    477478                ASMAtomicIncS32(&pArgs->cRefs);
    478                 BOOLEAN ret = KeInsertQueueDpc(&paExecCpuDpcs[i], 0, 0);
    479                 Assert(ret);
     479                BOOLEAN fRc = KeInsertQueueDpc(&paExecCpuDpcs[i], 0, 0);
     480                Assert(fRc); NOREF(fRc);
    480481            }
    481482        }
     
    605606{
    606607    PRTMPNTONSPECIFICARGS pArgs = (PRTMPNTONSPECIFICARGS)DeferredContext;
     608    RT_NOREF3(Dpc, SystemArgument1, SystemArgument2);
     609
    607610    ASMAtomicWriteBool(&pArgs->fExecuting, true);
    608611
     
    702705    {
    703706        BOOLEAN fRc = KeInsertQueueDpc(&pArgs->Dpc, 0, 0);
    704         Assert(fRc);
     707        Assert(fRc); NOREF(fRc);
    705708        KeLowerIrql(bOldIrql);
    706709
     
    813816int rtMpPokeCpuUsingBroadcastIpi(RTCPUID idCpu)
    814817{
     818    NOREF(idCpu);
    815819    g_pfnrtKeIpiGenericCall(rtMpIpiGenericCall, 0);
    816820    return VINF_SUCCESS;
  • trunk/src/VBox/Runtime/r0drv/nt/process-r0drv-nt.cpp

    r62477 r62663  
    3535RTDECL(RTPROCESS) RTProcSelf(void)
    3636{
    37     return (RTPROCESS)PsGetCurrentProcessId();
     37    return (RTPROCESS)(uintptr_t)PsGetCurrentProcessId();
    3838}
    3939
  • trunk/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp

    r62477 r62663  
    7272    Assert(!(fFlags & RTSEMEVENT_FLAGS_BOOTSTRAP_HACK) || (fFlags & RTSEMEVENT_FLAGS_NO_LOCK_VAL));
    7373    AssertCompile(sizeof(RTSEMEVENTINTERNAL) > sizeof(void *));
     74    RT_NOREF2(hClass, pszNameFmt);
    7475
    7576    PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)RTMemAlloc(sizeof(*pThis));
     
    173174    AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
    174175    AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER);
     176    NOREF(pSrcPos);
    175177
    176178    rtR0SemEventNtRetain(pThis);
  • trunk/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp

    r62477 r62663  
    7171{
    7272    AssertReturn(!(fFlags & ~RTSEMEVENTMULTI_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
     73    RT_NOREF2(hClass, pszNameFmt);
    7374
    7475    AssertCompile(sizeof(RTSEMEVENTMULTIINTERNAL) > sizeof(void *));
     
    196197    AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER);
    197198    AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER);
     199    RT_NOREF1(pSrcPos);
    198200
    199201    rtR0SemEventMultiNtRetain(pThis);
  • trunk/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp

    r62477 r62663  
    7272{
    7373    AssertReturn(!(fFlags & ~RTSEMMUTEX_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER);
     74    RT_NOREF3(hClass, uSubClass, pszNameFmt);
    7475
    7576    AssertCompile(sizeof(RTSEMMUTEXINTERNAL) > sizeof(void *));
     
    135136    AssertMsg(cMillies == RT_INDEFINITE_WAIT, ("timeouts are not supported when using fast mutexes!\n"));
    136137    ExAcquireFastMutex(&pThis->Mutex);
     138    return VINF_SUCCESS;
     139
    137140#else  /* !RT_USE_FAST_MUTEX */
    138141    NTSTATUS rcNt;
     
    166169    }
    167170#endif /* !RT_USE_FAST_MUTEX */
    168     return VINF_SUCCESS;
    169171}
    170172
     
    178180RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    179181{
     182    RT_NOREF1(uId); RT_SRC_POS_NOREF();
    180183    return RTSemMutexRequest(hMutexSem, cMillies);
    181184}
     
    190193RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    191194{
     195    RT_NOREF1(uId); RT_SRC_POS_NOREF();
    192196    return RTSemMutexRequestNoResume(hMutexSem, cMillies);
    193197}
  • trunk/src/VBox/Runtime/r0drv/nt/spinlock-r0drv-nt.cpp

    r62477 r62663  
    8686{
    8787    AssertReturn(fFlags == RTSPINLOCK_FLAGS_INTERRUPT_SAFE || fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE, VERR_INVALID_PARAMETER);
     88    RT_NOREF1(pszName);
    8889
    8990    /*
  • trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp

    r62477 r62663  
    8585RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
    8686{
    87     Assert(hThread == NIL_RTTHREAD);
     87    Assert(hThread == NIL_RTTHREAD); RT_NOREF1(hThread);
    8888    KIRQL Irql = KeGetCurrentIrql();
    8989    if (Irql > APC_LEVEL)
     
    9797RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
    9898{
    99     Assert(hThread == NIL_RTTHREAD);
     99    Assert(hThread == NIL_RTTHREAD); RT_NOREF1(hThread);
    100100
    101101    /*
     
    140140        fPending = *pu32QuantumEnd != 0;
    141141    }
     142    else
     143        fPending = false;
    142144
    143145    /* Check DpcQueueDepth. */
  • trunk/src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp

    r62477 r62663  
    8585DECLHIDDEN(int) rtThreadNativeAdopt(PRTTHREADINT pThread)
    8686{
     87    RT_NOREF1(pThread);
    8788    return VERR_NOT_IMPLEMENTED;
    8889}
     
    9394    PVOID pvThreadObj = pThread->Core.Key;
    9495    NTSTATUS rcNt = KeWaitForSingleObject(pvThreadObj, Executive, KernelMode, FALSE, NULL);
    95     AssertMsg(rcNt == STATUS_SUCCESS, ("rcNt=%#x\n", rcNt));
     96    AssertMsg(rcNt == STATUS_SUCCESS, ("rcNt=%#x\n", rcNt)); RT_NOREF1(rcNt);
    9697}
    9798
  • trunk/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp

    r62477 r62663  
    151151#ifdef RTR0TIMER_NT_MANUAL_RE_ARM
    152152    Assert(pTimer->u64NanoInterval);
     153    RT_NOREF1(pMasterDpc);
    153154
    154155    uint64_t uNtNext = (iTick * pTimer->u64NanoInterval) / 100 - 10; /* 1us fudge */
     
    163164
    164165    KeSetTimerEx(&pTimer->NtTimer, DueTime, 0, &pTimer->aSubTimers[0].NtDpc);
     166#else
     167    RT_NOREF3(pTimer, iTick, pMasterDpc);
    165168#endif
    166169}
     
    426429    AssertPtrReturn(pTimer, VERR_INVALID_HANDLE);
    427430    AssertReturn(pTimer->u32Magic == RTTIMER_MAGIC, VERR_INVALID_HANDLE);
     431    RT_NOREF1(u64NanoInterval);
    428432
    429433    return VERR_NOT_SUPPORTED;
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