VirtualBox

Changeset 62673 in vbox


Ignore:
Timestamp:
Jul 29, 2016 11:04:35 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109246
Message:

ValidationKit/utils: warnings.

Location:
trunk/src/VBox/ValidationKit/utils
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp

    r62484 r62673  
    24912491{
    24922492    int     rc2;
     2493    RT_NOREF_PV(fFlags);
    24932494
    24942495    /*
     
    32623263    bool        fDaemonize      = true;
    32633264    bool        fDaemonized     = false;
    3264     bool        fTransportFixed = false;
    32653265    const char *pszUpgrading    = NULL;
    32663266
  • trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceTcp.cpp

    r62484 r62673  
    126126 * @returns NIL_RTSOCKET if consumed, other wise hTcpClient.
    127127 * @param   hTcpClient      The client socket.
    128  * @param   fFromServer     Set if server type connection.
    129  */
    130 static RTSOCKET txsTcpSetClient(RTSOCKET hTcpClient, bool fFromServer)
     128 */
     129static RTSOCKET txsTcpSetClient(RTSOCKET hTcpClient)
    131130{
    132131    RTCritSectEnter(&g_TcpCritSect);
     
    159158    if (RT_SUCCESS(rc))
    160159    {
    161         hTcpClient = txsTcpSetClient(hTcpClient, true /*fFromServer*/);
     160        hTcpClient = txsTcpSetClient(hTcpClient);
    162161        RTTcpServerDisconnectClient2(hTcpClient);
    163162    }
    164163
     164    RT_NOREF2(hSelf, pvUser);
    165165    return rc;
    166166}
     
    192192static DECLCALLBACK(int) txsTcpClientConnectThread(RTTHREAD hSelf, void *pvUser)
    193193{
     194    RT_NOREF1(pvUser);
     195
    194196    for (;;)
    195197    {
     
    209211        if (RT_SUCCESS(rc))
    210212        {
    211             hTcpClient = txsTcpSetClient(hTcpClient, true /*fFromServer*/);
     213            hTcpClient = txsTcpSetClient(hTcpClient);
    212214            RTTcpClientCloseEx(hTcpClient, true /* fGracefulShutdown*/);
    213215            break;
  • trunk/src/VBox/ValidationKit/utils/cpu/cidet-app.cpp

    r62484 r62673  
    4343
    4444#ifdef RT_OS_WINDOWS
    45 # include <Windows.h>
     45# include <iprt/win/windows.h>
    4646#else
    4747# define USE_SIGNALS
     
    566566                                                 uint32_t fFlags)
    567567{
     568    RT_NOREF_PV(pThis);
    568569    static uint8_t const s_afBufProtToDefaultMemProt[] =
    569570    {
     
    673674static bool CidetAppArmBuf(PCIDETAPP pThis, PCIDETAPPBUF pAppBuf)
    674675{
     676    RT_NOREF_PV(pThis);
    675677    uint8_t *pbUsingBuf = (pAppBuf->fUsingNormal ? pAppBuf->pbNormal : pAppBuf->pbLow);
    676678    if (pAppBuf->fLastPageProt == pAppBuf->fDefaultProt)
     
    693695static bool CidetAppDearmBuf(PCIDETAPP pThis, PCIDETAPPBUF pAppBuf)
    694696{
     697    RT_NOREF_PV(pThis);
    695698    uint8_t *pbUsingBuf = (pAppBuf->fUsingNormal ? pAppBuf->pbNormal : pAppBuf->pbLow);
    696699    int rc = RTMemProtect(pbUsingBuf, pAppBuf->cb, pAppBuf->fDefaultProt | RTMEM_PROT_READ | RTMEM_PROT_WRITE);
     
    11061109static DECLCALLBACK(void) CidetAppCbFailureV(PCIDETCORE pThis, const char *pszMsg, va_list va)
    11071110{
     1111    RT_NOREF_PV(pThis);
    11081112    RTTestIFailedV(pszMsg, va);
    11091113}
  • trunk/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp

    r62484 r62673  
    319319bool CidetCoreIsEncodingCompatibleWithInstruction(PCIDETCORE pThis)
    320320{
     321    RT_NOREF_PV(pThis);
    321322    return true;
    322323}
     
    727728static void cidetCoreSetupFirstBaseEncoding_MrmRmMod_32bit64bit(PCIDETCORE pThis, uint8_t iReg, bool f64Bit)
    728729{
     730    RT_NOREF_PV(f64Bit);
    729731    if (CidetInstrHasMrmRegOperand(pThis->pCurInstr))
    730732    {
     
    10721074static bool cidetCoreSetupNextBaseEncoding_SibScale(PCIDETCORE pThis, uint8_t iReg)
    10731075{
     1076    RT_NOREF_PV(iReg);
    10741077    switch ((pThis->bSib >> X86_SIB_SCALE_SHIFT) & X86_SIB_SCALE_SMASK)
    10751078    {
     
    13201323bool CidetCoreSetupNextMemoryOperandConfig(PCIDETCORE pThis)
    13211324{
     1325    RT_NOREF_PV(pThis);
    13221326    return false;
    13231327}
     
    13721376bool CidetCoreSetupNextCodeBufferConfig(PCIDETCORE pThis)
    13731377{
     1378    RT_NOREF_PV(pThis);
    13741379    return false;
    13751380}
     
    19111916     * The opcode.
    19121917     */
    1913     uint8_t const *pbOpcode = pThis->pCurInstr->abOpcode;
     1918    //uint8_t const *pbOpcode = pThis->pCurInstr->abOpcode;
    19141919    switch (pThis->pCurInstr->cbOpcode)
    19151920    {
     
    19321937        if (pThis->idxMrmRmOp < RT_ELEMENTS(pThis->aOperands))
    19331938        {
    1934             uint64_t uDispValue = pThis->aOperands[pThis->idxMrmRmOp].uImmDispValue;
     1939            //uint64_t uDispValue = pThis->aOperands[pThis->idxMrmRmOp].uImmDispValue;
    19351940            switch (pThis->aOperands[pThis->idxMrmRmOp].cbMemDisp)
    19361941            {
     
    19581963        if ((pThis->aOperands[iOp].fFlags & CIDET_OF_K_MASK) == CIDET_OF_K_IMM)
    19591964        {
    1960             uint64_t uImmValue = pThis->aOperands[iOp].uImmDispValue;
     1965            //uint64_t uImmValue = pThis->aOperands[iOp].uImmDispValue;
    19611966            switch (pThis->aOperands[iOp].cb)
    19621967            {
     
    21662171        CIDET_DPRINTF(("%04u: %s", iSubTest, szInstr));
    21672172        Assert(cbInstr == pThis->cbInstr);
     2173#else
     2174        RT_NOREF_PV(iSubTest);
    21682175#endif
    21692176        if (pThis->pfnSetupCodeBuf(pThis, &pThis->CodeBuf, pThis->abInstr))
  • trunk/src/VBox/ValidationKit/utils/nt/ntsetfreq.cpp

    r62484 r62673  
    2929*   Header Files                                                                                                                 *
    3030*********************************************************************************************************************************/
    31 #define _WIN32_WINNT 0x0500
    32 #include <Windows.h>
     31#include <iprt/nt/nt.h>
    3332
    3433#include <iprt/initterm.h>
     
    3938#include <iprt/thread.h>
    4039#include <iprt/err.h>
    41 
    42 RT_C_DECLS_BEGIN
    43 /* from sysinternals. */
    44 NTSYSAPI LONG NTAPI NtSetTimerResolution(IN ULONG DesiredResolution, IN BOOLEAN SetResolution, OUT PULONG CurrentResolution);
    45 NTSYSAPI LONG NTAPI NtQueryTimerResolution(OUT PULONG MinimumResolution, OUT PULONG MaximumResolution, OUT PULONG CurrentResolution);
    46 RT_C_DECLS_END
    47 
    4840
    4941
     
    109101     * Query the current resolution.
    110102     */
    111     ULONG   Cur = ~0;
    112     ULONG   Min = ~0;
    113     ULONG   Max = ~0;
    114     LONG    Status;
     103    ULONG    Cur = UINT32_MAX;
     104    ULONG    Min = UINT32_MAX;
     105    ULONG    Max = UINT32_MAX;
     106    NTSTATUS rcNt = STATUS_SUCCESS;
    115107    if (fVerbose || !u32NewRes)
    116108    {
    117         Status = NtQueryTimerResolution(&Min, &Max, &Cur);
    118         if (Status >= 0)
     109        rcNt = NtQueryTimerResolution(&Min, &Max, &Cur);
     110        if (NT_SUCCESS(rcNt))
    119111            RTMsgInfo("cur: %u (%u.%02u Hz)  min: %u (%u.%02u Hz)  max: %u (%u.%02u Hz)\n",
    120112                      Cur, 10000000 / Cur, (10000000 / (Cur * 100)) % 100,
     
    122114                      Max, 10000000 / Max, (10000000 / (Max * 100)) % 100);
    123115        else
    124             RTMsgError("NTQueryTimerResolution failed with status %#x\n", Status);
     116            RTMsgError("NTQueryTimerResolution failed with status %#x\n", rcNt);
    125117    }
    126118
    127119    if (u32NewRes)
    128120    {
    129         Status = NtSetTimerResolution(u32NewRes, TRUE, &Cur);
    130         if (Status < 0)
    131             RTMsgError("NTSetTimerResolution(%RU32,,) failed with status %#x\n", u32NewRes, Status);
     121        rcNt = NtSetTimerResolution(u32NewRes, TRUE, &Cur);
     122        if (!NT_SUCCESS(rcNt))
     123            RTMsgError("NTSetTimerResolution(%RU32,,) failed with status %#x\n", u32NewRes, rcNt);
    132124        else if (fVerbose)
    133125        {
    134             Cur = Min = Max = ~0;
    135             Status = NtQueryTimerResolution(&Min, &Max, &Cur);
    136             if (Status >= 0)
     126            Cur = Min = Max = UINT32_MAX;
     127            rcNt = NtQueryTimerResolution(&Min, &Max, &Cur);
     128            if (NT_SUCCESS(rcNt))
    137129                RTMsgInfo("new: %u (%u.%02u Hz) requested %RU32 (%u.%02u Hz)\n",
    138130                          Cur, 10000000 / Cur, (10000000 / (Cur * 100)) % 100,
    139131                          u32NewRes, 10000000 / u32NewRes, (10000000 / (u32NewRes * 100)) % 100);
    140132            else
    141                 RTMsgError("NTSetTimerResolution succeeded but the NTQueryTimerResolution call failed with status %#x (ignored)\n", Status);
    142             Status = 0;
     133                RTMsgError("NTSetTimerResolution succeeded but the NTQueryTimerResolution call failed with status %#x (ignored)\n",
     134                           rcNt);
     135            rcNt = STATUS_SUCCESS;
    143136        }
    144137    }
    145138
    146     if (u32NewRes && Status >= 0)
     139    if (u32NewRes && NT_SUCCESS(rcNt))
    147140    {
    148141        if (cSecsSleep == UINT32_MAX)
     
    154147    }
    155148
    156     return Status >= 0 ? 0 : 1;
     149    return NT_SUCCESS(rcNt) ? 0 : 1;
    157150}
    158151
  • trunk/src/VBox/ValidationKit/utils/nt/nttimesources.cpp

    r62484 r62673  
    2929*   Header Files                                                                                                                 *
    3030*********************************************************************************************************************************/
    31 #include <Windows.h>
     31#include <iprt/win/windows.h>
    3232
    3333#include <iprt/asm.h>
     
    8484int main(int argc, char **argv)
    8585{
     86    RT_NOREF1(argv);
     87
    8688    /*
    8789     * Init, create a test instance and "parse" arguments.
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette