VirtualBox

Changeset 63465 in vbox


Ignore:
Timestamp:
Aug 15, 2016 10:00:20 AM (8 years ago)
Author:
vboxsync
Message:

VMM: warnings (clang)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/APICAll.cpp

    r62878 r63465  
    9292
    9393
     94#if 0 /* unused */
    9495/**
    9596 * Checks if a vector is set in an APIC Pending-Interrupt Bitmap (PIB).
     
    103104    return ASMBitTest(pvPib, uVector);
    104105}
     106#endif /* unused */
    105107
    106108
     
    140142}
    141143
    142 
     144#if 0 /* unused */
    143145/**
    144146 * Clears the vector in an APIC Pending-Interrupt Bitmap (PIB).
     
    151153    ASMAtomicBitClear(pvPib, uVector);
    152154}
    153 
    154 
     155#endif /* unused */
     156
     157#if 0 /* unused */
    155158/**
    156159 * Atomically OR's a fragment (32 vectors) into an APIC 256-bit sparse
     
    167170    ASMAtomicOrU32(&pApicReg->u[idxFragment].u32Reg, u32Fragment);
    168171}
    169 
    170 
     172#endif /* unused */
     173
     174
     175#if 0 /* unused */
    171176/**
    172177 * Atomically AND's a fragment (32 vectors) into an APIC
     
    183188    ASMAtomicAndU32(&pApicReg->u[idxFragment].u32Reg, u32Fragment);
    184189}
     190#endif /* unused */
    185191
    186192
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r62869 r63465  
    277277    int rc = PDMCritSectEnter(&pVM->em.s.CritSectREM, VERR_SEM_BUSY);
    278278    AssertRCSuccess(rc);
     279#else
     280    RT_NOREF(pVM);
    279281#endif
    280282}
     
    293295
    294296    PDMCritSectLeave(&pVM->em.s.CritSectREM);
     297#else
     298    RT_NOREF(pVM);
    295299#endif
    296300}
     
    311315    return PDMCritSectIsOwner(&pVM->em.s.CritSectREM);
    312316#else
     317    RT_NOREF(pVM);
    313318    return true;
    314319#endif
     
    330335    return PDMCritSectTryEnter(&pVM->em.s.CritSectREM);
    331336#else
     337    RT_NOREF(pVM);
    332338    return VINF_SUCCESS;
    333339#endif
     
    420426
    421427
     428#if !defined(VBOX_WITH_IEM) || defined(VBOX_COMPARE_IEM_AND_EM)
    422429DECLINLINE(int) emDisCoreOne(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, RTGCUINTPTR InstrGC, uint32_t *pOpsize)
    423430{
     
    425432    return DISInstrWithReader(InstrGC, (DISCPUMODE)pDis->uCpuMode, emReadBytes, pVCpu, pDis, pOpsize);
    426433}
     434#endif
    427435
    428436
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r62601 r63465  
    2929*   Global Variables                                                                                                             *
    3030*********************************************************************************************************************************/
     31#ifdef RT_ARCH_X86
    3132/**
    3233 * Parity calculation table.
     
    324325    /* 0xff = 11111111b */ X86_EFL_PF,
    325326};
     327#endif /* RT_ARCH_X86 */
    326328
    327329
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r62653 r63465  
    551551}
    552552
    553 
    554 /**
    555  * Internal - statistics only.
    556  */
    557 DECLINLINE(void) iomMMIOStatLength(PVM pVM, unsigned cb)
    558 {
    559 #ifdef VBOX_WITH_STATISTICS
    560     switch (cb)
    561     {
    562         case 1:
    563             STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO1Byte);
    564             break;
    565         case 2:
    566             STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO2Bytes);
    567             break;
    568         case 4:
    569             STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO4Bytes);
    570             break;
    571         case 8:
    572             STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIO8Bytes);
    573             break;
    574         default:
    575             /* No way. */
    576             AssertMsgFailed(("Invalid data length %d\n", cb));
    577             break;
    578     }
    579 #else
    580     NOREF(pVM); NOREF(cb);
    581 #endif
    582 }
    583 
    584 
    585 
    586553/**
    587554 * Common worker for the \#PF handler and IOMMMIOPhysHandler (APIC+VT-x).
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r62478 r63465  
    420420                                         !!pCurType->pfnHandlerR3, fRestoreAsRAM);
    421421# endif
     422#else
     423    RT_NOREF_PV(pCurType);
    422424#endif
    423425}
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r62606 r63465  
    4545*********************************************************************************************************************************/
    4646RT_C_DECLS_BEGIN
     47#if 0 /* unused */
    4748DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PGMPOOLKIND enmKind);
    4849DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PGMPOOLKIND enmKind);
     50#endif /* unused */
    4951static void pgmPoolTrackClearPageUsers(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
    5052static void pgmPoolTrackDeref(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
     
    6668
    6769
     70#if 0 /* unused */
    6871/**
    6972 * Checks if the specified page pool kind is for a 4MB or 2MB guest page.
     
    8487    }
    8588}
     89#endif /* unused */
    8690
    8791
     
    31183122
    31193123
     3124#if 0 /* unused */
    31203125/**
    31213126 * Gets the entry size of a shadow table.
     
    31663171    }
    31673172}
    3168 
    3169 
     3173#endif /* unused */
     3174
     3175#if 0 /* unused */
    31703176/**
    31713177 * Gets the entry size of a guest table.
     
    32203226    }
    32213227}
     3228#endif /* unused */
    32223229
    32233230
  • trunk/src/VBox/VMM/VMMAll/TMAllCpu.cpp

    r62654 r63465  
    188188
    189189
     190#ifdef VBOX_WITH_STATISTICS
    190191/**
    191192 * Record why we refused to use offsetted TSC.
     
    222223    }
    223224}
     225#endif /* VBOX_WITH_STATISTICS */
    224226
    225227
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r62478 r63465  
    18501850
    18511851
     1852#if 0 /* unused */
    18521853/**
    18531854 * Gets the host physical address for a page given by it's ID.
     
    18641865    return NIL_RTHCPHYS;
    18651866}
     1867#endif /* unused */
    18661868
    18671869
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r63127 r63465  
    598598
    599599
     600#ifdef VBOX_STRICT
    600601/**
    601602 * Reads the VM-entry exception error code field from the VMCS into
     
    613614    return VINF_SUCCESS;
    614615}
    615 
    616 
     616#endif /* VBOX_STRICT */
     617
     618
     619#ifdef VBOX_STRICT
    617620/**
    618621 * Reads the VM-entry exception error code field from the VMCS into
     
    630633    return VINF_SUCCESS;
    631634}
     635#endif /* VBOX_STRICT */
    632636
    633637
     
    78457849
    78467850
     7851#if 0 /* unused */
    78477852/**
    78487853 * Sets a general-protection (\#GP) exception as pending-for-injection into the
     
    78637868    hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 0 /* cbInstr */, u32ErrorCode, 0 /* GCPtrFaultAddress */);
    78647869}
     7870#endif /* unused */
    78657871
    78667872
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r62637 r63465  
    371371};
    372372
     373#if 0 /** @todo */
    373374/** Saved state field descriptors for X86XSAVEOPMASK. */
    374375static const SSMFIELD g_aCpumOpmaskFields[] =
     
    384385    SSMFIELD_ENTRY_TERM()
    385386};
     387#endif
    386388
    387389/** Saved state field descriptors for X86XSAVEZMMHI256. */
  • trunk/src/VBox/VMM/VMMR3/CPUMDbg.cpp

    r62637 r63465  
    10861086};
    10871087
     1088#if 0 /** @todo */
    10881089/** Sub-fields for the SF_MASK MSR. */
    10891090static DBGFREGSUBFIELD const g_aCpumRegFields_sf_mask[] =
     
    10921093    DBGFREGSUBFIELD_TERMINATOR()
    10931094};
     1095#endif
    10941096
    10951097
  • trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp

    r62478 r63465  
    183183/** @} */
    184184
     185#ifndef CPUM_DB_STANDALONE
    185186
    186187#include "cpus/Intel_Core_i7_6700K.h"
     
    295296
    296297
    297 #ifndef CPUM_DB_STANDALONE
    298298
    299299/**
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r62659 r63465  
    9292#endif
    9393static VBOXSTRICTRC emR3Debug(PVM pVM, PVMCPU pVCpu, VBOXSTRICTRC rc);
     94#if defined(VBOX_WITH_REM) || defined(DEBUG)
    9495static int emR3RemStep(PVM pVM, PVMCPU pVCpu);
     96#endif
    9597static int emR3RemExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone);
    9698int emR3HighPriorityPostForcedActions(PVM pVM, PVMCPU pVCpu, int rc);
     
    519521#ifdef VBOX_WITH_REM
    520522    PDMR3CritSectDelete(&pVM->em.s.CritSectREM);
     523#else
     524    RT_NOREF(pVM);
    521525#endif
    522526    return VINF_SUCCESS;
     
    990994
    991995
     996#if defined(VBOX_WITH_REM) || defined(DEBUG)
    992997/**
    993998 * Steps recompiled code.
     
    10031008    Log3(("emR3RemStep: cs:eip=%04x:%08x\n", CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
    10041009
    1005 #ifdef VBOX_WITH_REM
     1010# ifdef VBOX_WITH_REM
    10061011    EMRemLock(pVM);
    10071012
     
    10171022    EMRemUnlock(pVM);
    10181023
    1019 #else
     1024# else
    10201025    int rc = VBOXSTRICTRC_TODO(IEMExecOne(pVCpu)); NOREF(pVM);
    1021 #endif
     1026# endif
    10221027
    10231028    Log3(("emR3RemStep: returns %Rrc cs:eip=%04x:%08x\n", rc, CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
    10241029    return rc;
    10251030}
    1026 
    1027 
     1031#endif /* VBOX_WITH_REM || DEBUG */
     1032
     1033
     1034#ifdef VBOX_WITH_REM
    10281035/**
    10291036 * emR3RemExecute helper that syncs the state back from REM and leave the REM
     
    10361043DECLINLINE(bool) emR3RemExecuteSyncBack(PVM pVM, PVMCPU pVCpu)
    10371044{
    1038 #ifdef VBOX_WITH_REM
    10391045    STAM_PROFILE_START(&pVCpu->em.s.StatREMSync, a);
    10401046    REMR3StateBack(pVM, pVCpu);
     
    10421048
    10431049    EMRemUnlock(pVM);
    1044 #endif
    10451050    return false;
    10461051}
     1052#endif
    10471053
    10481054
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r63128 r63465  
    28712871    else
    28722872    {
     2873#ifdef VBOX_WITH_REM
    28732874        RTGCPHYS cb = pCur->RamRange.cb;
     2875#endif
    28742876
    28752877        /* Clear the tracking data of pages we're going to reactivate. */
  • trunk/src/VBox/VMM/VMMR3/SELM.cpp

    r63429 r63465  
    107107*   Global Variables                                                                                                             *
    108108*********************************************************************************************************************************/
    109 #ifdef LOG_ENABLED
     109#if defined(VBOX_WITH_RAW_MODE) && defined(LOG_ENABLED)
    110110/** Segment register names. */
    111111static char const g_aszSRegNms[X86_SREG_COUNT][4] = { "ES", "CS", "SS", "DS", "FS", "GS" };
  • trunk/src/VBox/VMM/VMMR3/SSM.cpp

    r62869 r63465  
    869869*   Global Variables                                                                                                             *
    870870*********************************************************************************************************************************/
     871#ifndef SSM_STANDALONE
    871872/** Zeros used by the struct putter.
    872873 * This must be at least 8 bytes or the code breaks. */
    873874static uint8_t const    g_abZero[_1K] = {0};
     875#endif
    874876
    875877
  • trunk/src/VBox/VMM/VMMR3/VMEmt.cpp

    r62650 r63465  
    962962             && pUVCpu->pVCpu->enmState == VMCPUSTATE_STARTED_EXEC_REM)
    963963        REMR3NotifyFF(pUVCpu->pVM);
     964#else
     965    RT_NOREF(fFlags);
    964966#endif
    965967}
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