VirtualBox

Changeset 39084 in vbox for trunk


Ignore:
Timestamp:
Oct 22, 2011 12:37:15 AM (13 years ago)
Author:
vboxsync
Message:

VMM: -Wunused-parameter on mac.

Location:
trunk/src/VBox/VMM
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r39078 r39084  
    679679DECLINLINE(void)            gmmR0FreeSharedPage(PGMM pGMM, PGVM pGVM, uint32_t idPage, PGMMPAGE pPage);
    680680static int                  gmmR0UnmapChunkLocked(PGMM pGMM, PGVM pGVM, PGMMCHUNK pChunk);
     681#ifdef VBOX_WITH_PAGE_SHARING
    681682static void                 gmmR0SharedModuleCleanup(PGMM pGMM, PGVM pGVM);
     683#endif
    682684
    683685
     
    41634165 * @param   pRegions            Shared region(s)
    41644166 */
    4165 GMMR0DECL(int) GMMR0RegisterSharedModule(PVM pVM, VMCPUID idCpu, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule,
     4167GMMR0DECL(int) GMMR0RegisterSharedModule(PVM pVM, VMCPUID idCpu, VBOXOSFAMILY enmGuestOS, char *pszModuleName,
     4168                                         char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule,
    41664169                                         unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions)
    41674170{
     
    43254328    return rc;
    43264329#else
     4330
     4331    NOREF(pVM); NOREF(idCpu); NOREF(enmGuestOS); NOREF(pszModuleName); NOREF(pszVersion);
     4332    NOREF(GCBaseAddr); NOREF(cbModule); NOREF(cRegions); NOREF(pRegions);
    43274333    return VERR_NOT_IMPLEMENTED;
    43284334#endif
     
    43644370 * @param   cbModule            Module size
    43654371 */
    4366 GMMR0DECL(int) GMMR0UnregisterSharedModule(PVM pVM, VMCPUID idCpu, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule)
     4372GMMR0DECL(int) GMMR0UnregisterSharedModule(PVM pVM, VMCPUID idCpu, char *pszModuleName, char *pszVersion,
     4373                                           RTGCPTR GCBaseAddr, uint32_t cbModule)
    43674374{
    43684375#ifdef VBOX_WITH_PAGE_SHARING
     
    44414448    return rc;
    44424449#else
     4450
     4451    NOREF(pVM); NOREF(idCpu); NOREF(pszModuleName); NOREF(pszVersion); NOREF(GCBaseAddr); NOREF(cbModule);
    44434452    return VERR_NOT_IMPLEMENTED;
    44444453#endif
     
    47874796    return rc;
    47884797#else
     4798    NOREF(pVM); NOREF(idCpu);
    47894799    return VERR_NOT_IMPLEMENTED;
    47904800#endif
     
    49204930    return rc;
    49214931#else
     4932    NOREF(pVM); NOREF(pVCpu);
    49224933    return VERR_NOT_IMPLEMENTED;
    49234934#endif
  • trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r39078 r39084  
    672672# ifdef VBOX_STRICT
    673673    { "pgmassertcr3",  0, 0,        NULL,                     0,         0,      pgmR3CmdAssertCR3,  "",                     "Check the shadow CR3 mapping." },
    674 #  if HC_ARCH_BITS == 64
     674#  ifdef VBOX_WITH_PAGE_SHARING
    675675    { "pgmcheckduppages", 0, 0,     NULL,                     0,         0,      pgmR3CmdCheckDuplicatePages,  "",           "Check for duplicate pages in all running VMs." },
    676676    { "pgmsharedmodules", 0, 0,     NULL,                     0,         0,      pgmR3CmdShowSharedModules,  "",             "Print shared modules info." },
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r39078 r39084  
    923923
    924924#if HC_ARCH_BITS == 64 && (defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD))
     925
    925926/**
    926927 * Rendezvous callback used by PGMR3ChangeMemBalloon that changes the memory balloon size
     
    10421043}
    10431044
     1045
    10441046/**
    10451047 * Frees a range of ram pages, replacing them with ZERO pages; helper for PGMR3PhysFreeRamPages
     
    10641066    RTMemFree(paPhysPage);
    10651067}
    1066 #endif
     1068
     1069#endif /* 64-bit host && (Windows || Solaris || Linux || FreeBSD) */
    10671070
    10681071/**
     
    11091112    }
    11101113    return rc;
     1114
    11111115#else
     1116    NOREF(pVM); NOREF(fInflate); NOREF(cPages); NOREF(paPhysPage);
    11121117    return VERR_NOT_IMPLEMENTED;
    11131118#endif
    11141119}
     1120
    11151121
    11161122/**
  • trunk/src/VBox/VMM/VMMR3/PGMSharedPage.cpp

    r39078 r39084  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2011 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3636#include "PGMInline.h"
    3737
     38
    3839/*******************************************************************************
    3940*   Global Variables                                                           *
    4041*******************************************************************************/
    41 #if defined(VBOX_STRICT) && HC_ARCH_BITS == 64
     42#if defined(VBOX_WITH_PAGE_SHARING) && defined(VBOX_STRICT)
    4243/** Keep a copy of all registered shared modules for the .pgmcheckduppages debugger command. */
    43 static PGMMREGISTERSHAREDMODULEREQ g_apSharedModules[512] = {0};
    44 static unsigned g_cSharedModules = 0;
     44static PGMMREGISTERSHAREDMODULEREQ  g_apSharedModules[512] = {0};
     45static unsigned                     g_cSharedModules = 0;
    4546#endif
     47
    4648
    4749/**
     
    5860 * @param   pRegions            Shared region(s)
    5961 */
    60 VMMR3DECL(int) PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule,
    61                                          unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions)
     62VMMR3DECL(int) PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion,
     63                                         RTGCPTR GCBaseAddr, uint32_t cbModule, unsigned cRegions,
     64                                         VMMDEVSHAREDREGIONDESC *pRegions)
    6265{
    6366#ifdef VBOX_WITH_PAGE_SHARING
    64     PGMMREGISTERSHAREDMODULEREQ pReq;
    65 
    6667    Log(("PGMR3SharedModuleRegister family=%d name=%s version=%s base=%RGv size=%x cRegions=%d\n", enmGuestOS, pszModuleName, pszVersion, GCBaseAddr, cbModule, cRegions));
    6768
     
    6970    AssertReturn(cRegions < VMMDEVSHAREDREGIONDESC_MAX, VERR_INVALID_PARAMETER);
    7071
     72    PGMMREGISTERSHAREDMODULEREQ pReq;
    7173    pReq = (PGMMREGISTERSHAREDMODULEREQ)RTMemAllocZ(RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions]));
    7274    AssertReturn(pReq, VERR_NO_MEMORY);
     
    8789
    8890    int rc = GMMR3RegisterSharedModule(pVM, pReq);
    89 # if defined(VBOX_STRICT) && HC_ARCH_BITS == 64
     91# ifdef VBOX_STRICT
    9092    if (rc == VINF_SUCCESS)
    9193    {
     
    106108            if (ppSharedModule)
    107109            {
    108                 *ppSharedModule = (PGMMREGISTERSHAREDMODULEREQ)RTMemAllocZ(RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions]));
    109                 memcpy(*ppSharedModule, pReq, RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions]));
     110                size_t const cbSharedModule = RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions]);
     111                *ppSharedModule = (PGMMREGISTERSHAREDMODULEREQ)RTMemDup(pReq, cbSharedModule);
    110112                g_cSharedModules++;
    111113            }
    112114        }
    113115    }
    114 # endif
     116# endif /* VBOX_STRICT */
    115117
    116118    RTMemFree(pReq);
     
    120122
    121123    return VINF_SUCCESS;
    122 #else
     124#else  /* !VBOX_WITH_PAGE_SHARING */
     125
     126    NOREF(pVM); NOREF(enmGuestOS); NOREF(pszModuleName); NOREF(pszVersion); NOREF(GCBaseAddr);
     127    NOREF(cbModule); NOREF(cRegions); NOREF(pRegions);
    123128    return VERR_NOT_IMPLEMENTED;
    124 #endif
    125 }
     129#endif /* !VBOX_WITH_PAGE_SHARING */
     130}
     131
    126132
    127133/**
     
    148154    pReq->cbModule      = cbModule;
    149155
    150     if (    RTStrCopy(pReq->szName, sizeof(pReq->szName), pszModuleName) != VINF_SUCCESS
    151         ||  RTStrCopy(pReq->szVersion, sizeof(pReq->szVersion), pszVersion) != VINF_SUCCESS)
     156    if (   RTStrCopy(pReq->szName, sizeof(pReq->szName), pszModuleName) != VINF_SUCCESS
     157        || RTStrCopy(pReq->szVersion, sizeof(pReq->szVersion), pszVersion) != VINF_SUCCESS)
    152158    {
    153159        RTMemFree(pReq);
     
    157163    RTMemFree(pReq);
    158164
    159 # if defined(VBOX_STRICT) && HC_ARCH_BITS == 64
     165# ifdef VBOX_STRICT
    160166    for (unsigned i = 0; i < g_cSharedModules; i++)
    161167    {
     
    170176        }
    171177    }
    172 # endif
     178# endif /* VBOX_STRICT */
    173179    return rc;
    174 #else
     180#else  /* !VBOX_WITH_PAGE_SHARING */
     181
     182    NOREF(pVM); NOREF(pszModuleName); NOREF(pszVersion); NOREF(GCBaseAddr); NOREF(cbModule);
    175183    return VERR_NOT_IMPLEMENTED;
    176 #endif
     184#endif /* !VBOX_WITH_PAGE_SHARING */
    177185}
    178186
    179187#ifdef VBOX_WITH_PAGE_SHARING
     188
    180189/**
    181190 * Rendezvous callback that will be called once.
     
    221230    AssertRCSuccess(rc);
    222231}
    223 #endif
     232
     233#endif /* !VBOX_WITH_PAGE_SHARING */
    224234
    225235/**
     
    235245    return VMR3ReqCallNoWait(pVM, VMCPUID_ANY_QUEUE, (PFNRT)pgmR3CheckSharedModulesHelper, 2, pVM, VMMGetCpuId(pVM));
    236246#else
     247    NOREF(pVM);
    237248    return VERR_NOT_IMPLEMENTED;
    238249#endif
    239250}
    240251
     252
    241253/**
    242254 * Query the state of a page in a shared module
    243255 *
    244256 * @returns VBox status code.
    245  * @param   pVM                 VM handle
    246  * @param   GCPtrPage           Page address
    247  * @param   pfShared            Shared status (out)
    248  * @param   puPageFlags         Page flags (out)
    249  */
    250 VMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *puPageFlags)
     257 * @param   pVM                 VM handle.
     258 * @param   GCPtrPage           Page address.
     259 * @param   pfShared            Shared status (out).
     260 * @param   pfPageFlags         Page flags (out).
     261 */
     262VMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *pfPageFlags)
    251263{
    252264#if defined(VBOX_WITH_PAGE_SHARING) && defined(DEBUG)
     
    266278        {
    267279            *pfShared    = PGM_PAGE_IS_SHARED(pPage);
    268             *puPageFlags = fFlags;
     280            *pfPageFlags = fFlags;
    269281        }
    270282        else
     
    277289    case VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT:
    278290        *pfShared = false;
    279         *puPageFlags = 0;
     291        *pfPageFlags = 0;
    280292        rc = VINF_SUCCESS;
    281293        break;
     
    288300    return rc;
    289301#else
     302    NOREF(pVM); NOREF(GCPtrPage); NOREF(pfShared); NOREF(pfPageFlags);
    290303    return VERR_NOT_IMPLEMENTED;
    291304#endif
    292305}
    293306
    294 #if defined(VBOX_STRICT) && HC_ARCH_BITS == 64
     307#if defined(VBOX_WITH_PAGE_SHARING) && defined(VBOX_STRICT)
    295308
    296309/**
     
    415428}
    416429
    417 #endif /* VBOX_STRICT && HC_ARCH_BITS == 64*/
     430#endif /* VBOX_STRICT && VBOX_WITH_PAGE_SHARING */
  • trunk/src/VBox/VMM/testcase/tstAnimate.cpp

    r38636 r39084  
    5454static void SigInterrupt(int iSignal)
    5555{
     56    NOREF(iSignal);
    5657    signal(SIGINT, SigInterrupt);
    5758    g_fSignaled = true;
     
    6364static int scriptGPReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
    6465{
     66    NOREF(pszVar);
    6567    uint32_t u32;
    6668    int rc = RTStrToUInt32Ex(pszValue, NULL, 16, &u32);
     
    7476static int scriptSelReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
    7577{
     78    NOREF(pszVar);
    7679    uint16_t u16;
    7780    int rc = RTStrToUInt16Ex(pszValue, NULL, 16, &u16);
     
    8588static int scriptSysReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
    8689{
     90    NOREF(pszVar);
    8791    uint32_t u32;
    8892    int rc = RTStrToUInt32Ex(pszValue, NULL, 16, &u32);
     
    97101static int scriptDtrReg(PVM pVM, char *pszVar, char *pszValue, void *pvUser)
    98102{
     103    NOREF(pszVar);
    99104    char *pszPart2 = strchr(pszValue, ':');
    100105    if (!pszPart2)
     
    125130static int scriptCommand(PVM pVM, const char *pszIn, size_t cch)
    126131{
     132    NOREF(cch);
    127133    int rc = VINF_SUCCESS;
    128134    char *psz = RTStrDup(pszIn);
  • trunk/src/VBox/VMM/testcase/tstCompressionBenchmark.cpp

    r38636 r39084  
    6464static DECLCALLBACK(int) ComprOutCallback(void *pvUser, const void *pvBuf, size_t cbBuf)
    6565{
     66    NOREF(pvUser);
    6667    AssertReturn(g_cbCompr + cbBuf <= g_cbComprAlloc, VERR_BUFFER_OVERFLOW);
    6768    memcpy(&g_pabCompr[g_cbCompr], pvBuf, cbBuf);
     
    7576static DECLCALLBACK(int) DecomprInCallback(void *pvUser, void *pvBuf, size_t cbBuf, size_t *pcbBuf)
    7677{
     78    NOREF(pvUser);
    7779    size_t cb = RT_MIN(cbBuf, g_cbCompr - g_offComprIn);
    7880    if (pcbBuf)
  • trunk/src/VBox/VMM/testcase/tstPDMAsyncCompletion.cpp

    r38636 r39084  
    6262{
    6363    LogFlow((TESTCASE ": %s: pVM=%p pvUser=%p pvUser2=%p\n", __FUNCTION__, pVM, pvUser, pvUser2));
     64    NOREF(rc);
    6465
    6566    uint32_t cTasksStillLeft = ASMAtomicDecU32(&g_cTasksLeft);
  • trunk/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp

    r38636 r39084  
    392392    PPDMACTESTFILE pTestFile = (PPDMACTESTFILE)pvUser2;
    393393    PPDMACTESTFILETASK pTestTask = (PPDMACTESTFILETASK)pvUser;
     394    NOREF(pVM); NOREF(rcReq);
    394395
    395396    if (pTestTask->fWrite)
  • trunk/src/VBox/VMM/testcase/tstVMM-HwAccm.cpp

    r38636 r39084  
    3939
    4040
    41 DECLCALLBACK(int) CFGMConstructor(PVM pVM, void *pvUser)
     41static DECLCALLBACK(int) CFGMConstructor(PVM pVM, void *pvUser)
    4242{
     43    NOREF(pvUser);
     44
    4345    /*
    4446     * Get root node first.
  • trunk/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp

    r38636 r39084  
    5656int foo(int i, int iZero, int iMinusOne)
    5757{
     58    NOREF(iZero);
     59
    5860    /* allocate a buffer which we fill up to the end. */
    5961    size_t cb = (i % 1555) + 32;
  • trunk/src/VBox/VMM/testcase/tstVMREQ.cpp

    r38636 r39084  
    5151static DECLCALLBACK(void) MyAtRuntimeError(PVM pVM, void *pvUser, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)
    5252{
     53    NOREF(pVM);
    5354    if (strcmp((const char *)pvUser, "user argument"))
    5455    {
     
    8788static DECLCALLBACK(int) PassVACallback(PVM pVM, unsigned u4K, unsigned u1G, const char *pszFormat, va_list *pva)
    8889{
     90    NOREF(pVM);
    8991    if (u4K != _4K)
    9092    {
     
    163165 * Thread function which allocates and frees requests like wildfire.
    164166 */
    165 static DECLCALLBACK(int) Thread(RTTHREAD Thread, void *pvUser)
     167static DECLCALLBACK(int) Thread(RTTHREAD hThreadSelf, void *pvUser)
    166168{
    167169    int rc = VINF_SUCCESS;
    168170    PVM pVM = (PVM)pvUser;
     171    NOREF(hThreadSelf);
     172
    169173    for (unsigned i = 0; i < 100000; i++)
    170174    {
  • trunk/src/VBox/VMM/testcase/tstX86-1.cpp

    r36865 r39084  
    8989{
    9090    ucontext_t *pCtx = (ucontext_t *)pvSigCtx;
     91    NOREF(pSigInfo);
    9192
    9293# if defined(RT_ARCH_AMD64) && defined(RT_OS_DARWIN)
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