VirtualBox

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

SUPDrv: warnings

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

Legend:

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

    r62490 r62664  
    148148DECLINLINE(int)             supdrvLdrUnlock(PSUPDRVDEVEXT pDevExt);
    149149static int                  supdrvIOCtl_CallServiceModule(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPCALLSERVICE pReq);
    150 static int                  supdrvIOCtl_LoggerSettings(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLOGGERSETTINGS pReq);
     150static int                  supdrvIOCtl_LoggerSettings(PSUPLOGGERSETTINGS pReq);
    151151static int                  supdrvIOCtl_MsrProber(PSUPDRVDEVEXT pDevExt, PSUPMSRPROBER pReq);
    152152static int                  supdrvIOCtl_ResumeSuspendedKbds(void);
     
    20272027
    20282028            /* execute */
    2029             pReq->Hdr.rc = supdrvIOCtl_LoggerSettings(pDevExt, pSession, pReq);
     2029            pReq->Hdr.rc = supdrvIOCtl_LoggerSettings(pReq);
    20302030            return 0;
    20312031        }
     
    38363836    return supdrvOSEnableVTx(fEnable);
    38373837#else
     3838    RT_NOREF1(fEnable);
    38383839    return VERR_NOT_SUPPORTED;
    38393840#endif
     
    38703871    supdrvOSResumeVTxOnCpu(fSuspended);
    38713872#else
     3873    RT_NOREF1(fSuspended);
    38723874    Assert(!fSuspended);
    38733875#endif
     
    46934695            {
    46944696                supdrvLdrUnlock(pDevExt);
    4695                 Log(("Bad entry point address: %s=%p (rc=%Rrc)\n", pszWhat, pv, rc));
     4697                Log(("Bad entry point address: %s=%p (rc=%Rrc)\n", pszWhat, pv, rc)); NOREF(pszWhat);
    46964698                return rc;
    46974699            }
     
    55235525 *
    55245526 * @returns VBox status code.
    5525  * @param   pDevExt     The device extension.
    5526  * @param   pSession    The caller's session.
    55275527 * @param   pReq        The request.
    55285528 */
    5529 static int supdrvIOCtl_LoggerSettings(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLOGGERSETTINGS pReq)
     5529static int supdrvIOCtl_LoggerSettings(PSUPLOGGERSETTINGS pReq)
    55305530{
    55315531    const char *pszGroup = &pReq->u.In.szStrings[pReq->u.In.offGroups];
     
    57075707    return rc;
    57085708#else
     5709    RT_NOREF2(pDevExt, pReq);
    57095710    return VERR_NOT_IMPLEMENTED;
    57105711#endif
  • trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp

    r62490 r62664  
    188188 * updating.
    189189 *
    190  * @param   pGip             Pointer to the GIP.
    191190 * @param   pGipCpu          The per CPU structure for this CPU.
    192191 * @param   u64NanoTS        The current time.
    193192 */
    194 static void supdrvGipReInitCpu(PSUPGLOBALINFOPAGE pGip, PSUPGIPCPU pGipCpu, uint64_t u64NanoTS)
     193static void supdrvGipReInitCpu(PSUPGIPCPU pGipCpu, uint64_t u64NanoTS)
    195194{
    196195    /*
     
    217216
    218217    if (RT_LIKELY(iCpu < pGip->cCpus && pGip->aCPUs[iCpu].idCpu == idCpu))
    219         supdrvGipReInitCpu(pGip, &pGip->aCPUs[iCpu], *(uint64_t *)pvUser2);
     218        supdrvGipReInitCpu(&pGip->aCPUs[iCpu], *(uint64_t *)pvUser2);
    220219
    221220    NOREF(pvUser2);
     
    260259    uint16_t                idApic;
    261260    int                     iCpuSet;
     261    NOREF(pGip);
    262262
    263263    AssertMsg(idCpu == RTMpCpuId(), ("idCpu=%#x RTMpCpuId()=%#x\n", idCpu, RTMpCpuId())); /* paranoia^3 */
     
    505505                    || pGipR0->u32Mode == SUPGIPMODE_SYNC_TSC
    506506                    || RTMpGetOnlineCount() == 1)
    507                     supdrvGipReInitCpu(pGipR0, &pGipR0->aCPUs[0], u64NanoTS);
     507                    supdrvGipReInitCpu(&pGipR0->aCPUs[0], u64NanoTS);
    508508                else
    509509                    RTMpOnAll(supdrvGipReInitCpuCallback, pGipR0, &u64NanoTS);
     
    915915 *
    916916 * @param   pDevExt         Pointer to the device instance data.
    917  * @param   pGip            Pointer to the GIP.
    918  */
    919 static void supdrvGipInitStartTimerForRefiningInvariantTscFreq(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip)
     917 */
     918static void supdrvGipInitStartTimerForRefiningInvariantTscFreq(PSUPDRVDEVEXT pDevExt)
    920919{
    921920    uint64_t    u64NanoTS;
     
    10041003    uint64_t   *puTscStop = (uint64_t *)pvUser1;
    10051004    uint64_t   *pnsStop   = (uint64_t *)pvUser2;
     1005    RT_NOREF1(idCpu);
    10061006
    10071007    *puTscStop = ASMReadTSC();
     
    10201020 *
    10211021 * @returns VBox status code.
    1022  * @param   pDevExt         Pointer to the device instance.
    10231022 * @param   pGip            Pointer to the GIP.
    10241023 * @param   fRough          Set if we're doing the rough calculation that the
     
    10281027 *                          achieve in reasonably short time.
    10291028 */
    1030 static int supdrvGipInitMeasureTscFreq(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, bool fRough)
     1029static int supdrvGipInitMeasureTscFreq(PSUPGLOBALINFOPAGE pGip, bool fRough)
    10311030{
    10321031    uint32_t nsTimerIncr = RTTimerGetSystemGranularity();
     
    14851484       bit to much. */
    14861485    supdrvGipMpEventOnlineOrInitOnCpu((PSUPDRVDEVEXT)pvUser1, idCpu);
     1486    NOREF(pvUser2);
    14871487}
    14881488
     
    14991499    Assert(RTMpCpuIdToSetIndex(idCpu) == (intptr_t)pvUser2);
    15001500    ASMAtomicWriteU64((uint64_t volatile *)pvUser1, ASMReadTSC());
     1501    RT_NOREF2(idCpu, pvUser2);
    15011502}
    15021503
     
    16831684
    16841685    ASMAtomicWriteSize(&pCpu->enmState, SUPGIPCPUSTATE_INVALID);
    1685     ASMAtomicWriteSize(&pCpu->idCpu,    NIL_RTCPUID);
     1686    ASMAtomicWriteU32(&pCpu->idCpu,     NIL_RTCPUID);
    16861687    ASMAtomicWriteS16(&pCpu->iCpuSet,   -1);
    16871688    ASMAtomicWriteU16(&pCpu->idApic,    UINT16_MAX);
     
    18791880    if (pGip->u32Mode == SUPGIPMODE_INVARIANT_TSC)
    18801881    {
    1881         rc = supdrvGipInitMeasureTscFreq(pDevExt, pGip, true /*fRough*/); /* cannot fail */
    1882         supdrvGipInitStartTimerForRefiningInvariantTscFreq(pDevExt, pGip);
     1882        rc = supdrvGipInitMeasureTscFreq(pGip, true /*fRough*/); /* cannot fail */
     1883        supdrvGipInitStartTimerForRefiningInvariantTscFreq(pDevExt);
    18831884    }
    18841885    else
    1885         rc = supdrvGipInitMeasureTscFreq(pDevExt, pGip, false /*fRough*/);
     1886        rc = supdrvGipInitMeasureTscFreq(pGip, false /*fRough*/);
    18861887    if (RT_SUCCESS(rc))
    18871888    {
     
    24422443    uint64_t           u64TSC    = ASMReadTSC();
    24432444    uint64_t           u64NanoTS = RTTimeSystemNanoTS();
     2445    RT_NOREF1(pTimer);
    24442446
    24452447    if (pGip->enmUseTscDelta > SUPGIPUSETSCDELTA_PRACTICALLY_ZERO)
     
    24902492    uint64_t        u64TSC    = ASMReadTSC();
    24912493    uint64_t        NanoTS    = RTTimeSystemNanoTS();
     2494    RT_NOREF1(pTimer);
    24922495
    24932496    /** @todo reset the transaction number and whatnot when iTick == 1. */
     
    29402943{
    29412944    TSCDELTA_DBG_VARS();
     2945    RT_NOREF1(pOtherSync);
    29422946
    29432947    /*
     
    31653169
    31663170
    3167 static void supdrvTscDeltaMethod2ProcessDataOnMaster(PSUPDRVGIPTSCDELTARGS pArgs, uint32_t iLoop)
     3171static void supdrvTscDeltaMethod2ProcessDataOnMaster(PSUPDRVGIPTSCDELTARGS pArgs)
    31683172{
    31693173    int64_t     iMasterTscDelta  = pArgs->pMaster->i64TSCDelta;
     
    32643268{
    32653269    unsigned iLoop;
     3270    RT_NOREF1(iTry);
    32663271
    32673272    for (iLoop = 0; iLoop < GIP_TSC_DELTA_M2_LOOPS; iLoop++)
     
    33143319            if (iLoop >= GIP_TSC_DELTA_M2_PRIMER_LOOPS)
    33153320# endif
    3316                 supdrvTscDeltaMethod2ProcessDataOnMaster(pArgs, iLoop);
     3321                supdrvTscDeltaMethod2ProcessDataOnMaster(pArgs);
    33173322
    33183323            TSCDELTA_MASTER_KICK_OTHER_OUT_OF_AFTER(pMySync, pOtherSync);
     
    35073512    PSUPTSCDELTASYNC2 volatile *ppOtherSync = fIsMaster ? &pArgs->pSyncWorker : &pArgs->pSyncMaster;
    35083513    TSCDELTA_DBG_VARS();
     3514    RT_NOREF1(pMySync);
    35093515
    35103516    /*
     
    37523758{
    37533759    supdrvMeasureTscDeltaCallbackUnwrapped(idCpu, (PSUPDRVGIPTSCDELTARGS)pvUser1);
     3760    RT_NOREF1(pvUser2);
    37543761}
    37553762
     
    42344241        }
    42354242    }
    4236 
    4237     return rc;
     4243    /* not reached */
    42384244}
    42394245
     
    46394645    uint32_t        fFlags;
    46404646    RTMSINTERVAL    cMsWaitRetry;
     4647    RT_NOREF1(pDevExt);
    46414648
    46424649    /*
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r62490 r62664  
    5050#ifdef RT_OS_WINDOWS
    5151# ifndef CTL_CODE
    52 #  include <Windows.h>
     52#  include <iprt/win/windows.h>
    5353# endif
    5454  /* Automatic buffering, size not encoded. */
  • trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h

    r62490 r62664  
    4848
    4949#elif defined(RT_OS_WINDOWS)
    50     RT_C_DECLS_BEGIN
    51 #   if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
    52 #       define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
    53 #       define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
    54 #       define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
    55 #       define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
    56 #       define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
    57 #       define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
    58 #       define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
    59 #       define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
    60 #       pragma warning(disable : 4163)
    61 #       include <iprt/nt/nt.h>
    62 #       pragma warning(default : 4163)
    63 #       undef  _InterlockedExchange
    64 #       undef  _InterlockedExchangeAdd
    65 #       undef  _InterlockedCompareExchange
    66 #       undef  _InterlockedAddLargeStatistic
    67 #       undef  _interlockedbittestandset
    68 #       undef  _interlockedbittestandreset
    69 #       undef  _interlockedbittestandset64
    70 #       undef  _interlockedbittestandreset64
    71 #   else
    72 #       include <iprt/nt/nt.h>
    73 #   endif
     50#   include <iprt/nt/nt.h>
    7451#   include <memory.h>
    75     RT_C_DECLS_END
    7652
    7753#elif defined(RT_OS_LINUX)
  • trunk/src/VBox/HostDrivers/Support/SUPR0IdcClientInternal.h

    r62490 r62664  
    3232
    3333#ifdef RT_OS_WINDOWS
    34 # if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
    35 #  include <iprt/asm.h>
    36 #  define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
    37 #  define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
    38 #  define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
    39 #  define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
    40 #  pragma warning(disable : 4163)
    41 RT_C_DECLS_BEGIN
    42 #  include <ntddk.h>
    43 RT_C_DECLS_END
    44 #  pragma warning(default : 4163)
    45 #  undef  _InterlockedExchange
    46 #  undef  _InterlockedExchangeAdd
    47 #  undef  _InterlockedCompareExchange
    48 #  undef  _InterlockedAddLargeStatistic
    49 # else
    50 RT_C_DECLS_BEGIN
    51 #  include <ntddk.h>
    52 RT_C_DECLS_END
    53 # endif
    54 #endif /* RT_OS_WINDOWS */
     34# include <iprt/nt/ntddk.h>
     35#endif
    5536
    5637
  • trunk/src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c

    r62490 r62664  
    5858    rc = supR0IdcNativeCall(pHandle, SUPDRV_IDC_REQ_GET_SYMBOL, &Req.Hdr);
    5959    if (RT_SUCCESS(rc))
    60         ASMAtomicWritePtr((void * volatile *)ppfn, Req.u.Out.pfnSymbol);
     60        ASMAtomicWritePtr((void * volatile *)ppfn, (void *)(uintptr_t)Req.u.Out.pfnSymbol);
    6161}
    6262
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