VirtualBox

Changeset 62448 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 22, 2016 2:51:49 PM (8 years ago)
Author:
vboxsync
Message:

IPRT: More MSC level 4 warning fixes.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/asn1/asn1-ut-objid.cpp

    r57358 r62448  
    430430        RTAsn1MemInitAllocation(&pThis->Allocation, pAllocator);
    431431        pThis->cComponents = pSrc->cComponents;
     432#if 0 /** @todo breaks with arrays of ObjIds or structs containing them. They get resized and repositioned in memory, thus invalidating the pointer. Add recall-pointers callback, or just waste memory? Or maybe make all arrays pointer-arrays? */
    432433        size_t cbLeft = sizeof(pThis->szObjId);
    433 #if 0 /** @todo breaks with arrays of ObjIds or structs containing them. They get resized and repositioned in memory, thus invalidating the pointer. Add recall-pointers callback, or just waste memory? Or maybe make all arrays pointer-arrays? */
    434434        if (pSrc->cComponents * sizeof(uint32_t) <= cbLeft)
    435435        {
  • trunk/src/VBox/Runtime/common/asn1/asn1-ut-string.cpp

    r57358 r62448  
    518518    while (i-- > 0)
    519519    {
    520         uint32_t cchMatch;
     520        uint32_t cchMatch = 0; /* (MSC maybe used uninitialized) */
    521521        PCRTISO2022MAP pMap = papMaps[i];
    522522        /** @todo skip non-Teletex codesets if we ever add more than we need for it. */
     
    530530            return cchMatch + 1;
    531531        }
    532         else if (!ppMapRet) /* ppMapRet is NULL if Gn. */
     532
     533        if (!ppMapRet) /* ppMapRet is NULL if Gn. */
    533534        {
    534535            uint32_t iGn;
     
    10331034    if (RT_SUCCESS(rc))
    10341035    {
    1035         size_t cchUtf8 = 0;
    10361036        for (;;)
    10371037        {
  • trunk/src/VBox/Runtime/common/crypto/digest-builtin.cpp

    r61892 r62448  
    639639static DECLCALLBACK(RTDIGESTTYPE) rtCrDigestOsslEvp_GetDigestType(void *pvState)
    640640{
    641     EVP_MD_CTX *pThis = (EVP_MD_CTX *)pvState;
     641    //EVP_MD_CTX *pThis = (EVP_MD_CTX *)pvState;
    642642    /** @todo figure which digest algorithm it is! */
    643643    return RTDIGESTTYPE_UNKNOWN;
  • trunk/src/VBox/Runtime/common/crypto/store-inmem.cpp

    r57572 r62448  
    236236static DECLCALLBACK(int) rtCrStoreInMem_CertFindAll(void *pvProvider, PRTCRSTORECERTSEARCH pSearch)
    237237{
    238     PRTCRSTOREINMEM pThis = (PRTCRSTOREINMEM)pvProvider;
    239238    pSearch->auOpaque[0] = ~(uintptr_t)pvProvider;
    240239    pSearch->auOpaque[1] = 0;
  • trunk/src/VBox/Runtime/common/crypto/x509-certpaths.cpp

    r59678 r62448  
    26532653    int      rcLastFailure = VINF_SUCCESS;
    26542654    uint32_t cValidPaths   = 0;
    2655     uint32_t iPath         = 0;
    26562655    PRTCRX509CERTPATHNODE pCurLeaf;
    26572656    RTListForEach(&pThis->LeafList, pCurLeaf, RTCRX509CERTPATHNODE, ChildListOrLeafEntry)
  • trunk/src/VBox/Runtime/common/dbg/dbgcfg.cpp

    r57944 r62448  
    14011401        if (RT_SUCCESS(rc2))
    14021402        {
    1403             size_t cchCurPath = cchPath + strlen(&pszPath[cchPath]);
    14041403            for (uint32_t iSuffix = 0; papszSuffixes[iSuffix]; iSuffix++)
    14051404            {
  • trunk/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp

    r60798 r62448  
    278278
    279279
     280#ifdef LOG_ENABLED
    280281/**
    281282 * Gets a name string for a subsection type.
     
    325326    return s_sz;
    326327}
    327 
    328 
     328#endif /* LOG_ENABLED */
     329
     330
     331#ifdef LOG_ENABLED
    329332/**
    330333 * Gets a name string for a symbol type.
     
    337340    switch (enmSymType)
    338341    {
    339 #define CASE_RET_STR(Name)  case kCvSymType_##Name: return #Name;
     342# define CASE_RET_STR(Name)  case kCvSymType_##Name: return #Name;
    340343        CASE_RET_STR(Compile);
    341344        CASE_RET_STR(Register);
     
    446449    return "<unknown type>";
    447450}
     451#endif /* LOG_ENABLED */
    448452
    449453
     
    739743                    /*uint32_t uEnd          =*/ *uCursor.pu32++;
    740744                    /*uint32_t uNext         =*/ *uCursor.pu32++;
    741                     uint32_t cbProc        = *uCursor.pu32++;
     745                    /*uint32_t cbProc        =*/ *uCursor.pu32++;
    742746                    /*uint32_t offDebugStart =*/ *uCursor.pu32++;
    743747                    /*uint32_t offDebugEnd   =*/ *uCursor.pu32++;
     
    10291033        {
    10301034            PCRTCV8SRCINFO pSrcInfo = (PCRTCV8SRCINFO)&pThis->pbSrcInfo[off];
     1035#ifdef LOG_ENABLED
    10311036            const char    *pszName  = pSrcInfo->offSourceName < pThis->cbSrcStrings
    10321037                                    ? &pThis->pchSrcStrings[pSrcInfo->offSourceName] : "out-of-bounds.c!";
     
    10371042            else
    10381043                Log3(("    %010zx #%03zu: !%#x! %#x=%s\n", off, iFile, pSrcInfo->uDigestType, pSrcInfo->offSourceName, pszName));
     1044#endif
    10391045            off += pSrcInfo->uDigestType == RTCV8SRCINFO_DIGEST_TYPE_MD5 ? sizeof(*pSrcInfo) : 8;
    10401046            iFile++;
     
    11211127    uCursor.pv = pvSubSect;
    11221128    RTDBGMODCV_CHECK_NOMSG_RET_BF(cbSubSect >= 2 + 2 + 2 + 2 + 0 + 1);
    1123     uint16_t iOverlay = *uCursor.pu16++;
    1124     uint16_t iLib     = *uCursor.pu16++;
     1129    uint16_t iOverlay = *uCursor.pu16++; NOREF(iOverlay);
     1130    uint16_t iLib     = *uCursor.pu16++; NOREF(iLib);
    11251131    uint16_t cSegs    = *uCursor.pu16++;
    11261132    pThis->uCurStyle  = *uCursor.pu16++;
     
    11331139    RTDBGMODCV_CHECK_NOMSG_RET_BF(cbSubSect >= 2 + 2 + 2 + 2 + cSegs * 12U + 1 + cchName);
    11341140
     1141#ifdef LOG_ENABLED
    11351142    const char *pchName = (const char *)&uCursor.pu8[cSegs * 12 + 1];
    11361143    Log2(("RTDbgModCv: Module: iOverlay=%#x iLib=%#x cSegs=%#x Style=%c%c (%#x) %.*s\n", iOverlay, iLib, cSegs,
    11371144          RT_BYTE1(pThis->uCurStyle), RT_BYTE2(pThis->uCurStyle), pThis->uCurStyle, cchName, pchName));
     1145#endif
    11381146    RTDBGMODCV_CHECK_NOMSG_RET_BF(pThis->uCurStyle == RT_MAKE_U16('C', 'V'));
    11391147
     1148#ifdef LOG_ENABLED
    11401149    PCRTCVMODSEGINFO32 paSegs = (PCRTCVMODSEGINFO32)uCursor.pv;
    11411150    for (uint16_t iSeg = 0; iSeg < cSegs; iSeg++)
    11421151        Log2(("    #%02u: %04x:%08x LB %08x\n", iSeg, paSegs[iSeg].iSeg, paSegs[iSeg].off, paSegs[iSeg].cb));
     1152#endif
    11431153
    11441154    return VINF_SUCCESS;
     
    11811191    Log2(("RTDbgModCv: SrcModule: cFiles=%u cSegs=%u\n", pHdr->cFiles, pHdr->cFiles));
    11821192    RTDBGMODCV_CHECK_RET_BF(cbSubSect >= cbHdr, ("cbSubSect=%#x cbHdr=%zx\n", cbSubSect, cbHdr));
     1193#ifdef LOG_ENABLED
    11831194    if (LogIs2Enabled())
    11841195    {
     
    11901201            Log2(("RTDbgModCv:   seg #%u: %#010x-%#010x\n", paidxSegs[i], paSegRanges[i].offStart, paSegRanges[i].offEnd));
    11911202    }
     1203#endif
    11921204
    11931205    /*
     
    13331345        if (i == pHdr->cLogSegs)
    13341346            Log2(("Group/Physical descriptors: %u\n", pHdr->cSegs - pHdr->cLogSegs));
    1335         uint16_t idx = i < pHdr->cLogSegs ? i : i - pHdr->cLogSegs;
    13361347        char szFlags[16];
    13371348        memset(szFlags, '-', sizeof(szFlags));
     
    13541365            szFlags[8]  = '!', szFlags[9] = '\0';
    13551366        Log2(("    #%02u: %#010x LB %#010x flags=%#06x ovl=%#06x group=%#06x frame=%#06x iSegName=%#06x iClassName=%#06x %s\n",
    1356               idx, paDescs[i].off, paDescs[i].cb, paDescs[i].fFlags, paDescs[i].iOverlay, paDescs[i].iGroup,
    1357               paDescs[i].iFrame, paDescs[i].offSegName, paDescs[i].offClassName, szFlags));
     1367              i < pHdr->cLogSegs ? i : i - pHdr->cLogSegs, paDescs[i].off, paDescs[i].cb, paDescs[i].fFlags, paDescs[i].iOverlay,
     1368              paDescs[i].iGroup, paDescs[i].iFrame, paDescs[i].offSegName, paDescs[i].offClassName, szFlags));
    13581369
    13591370        RTDBGMODCV_CHECK_NOMSG_RET_BF(paDescs[i].offSegName == UINT16_MAX || paDescs[i].offSegName < pThis->cbSegNames);
     
    16131624    for (i = 0; i < pHdr->cSegs; i++)
    16141625        if (paDescs[i].fFlags & RTCVSEGMAPDESC_F_ABS)
    1615             paDescs[i].iGroup = (uint16_t)RTDBGSEGIDX_ABS;
     1626            paDescs[i].iGroup = (uint16_t)(RTDBGSEGIDX_ABS & UINT16_MAX);
    16161627        else if ((paDescs[i].fFlags & RTCVSEGMAPDESC_F_GROUP) || fNoGroups)
    16171628            paDescs[i].iGroup = iSeg++;
     
    20452056 */
    20462057
     2058#ifdef LOG_ENABLED
    20472059static const char *rtDbgModCvGetCoffStorageClassName(uint8_t bStorageClass)
    20482060{
     
    20832095    return s_szName;
    20842096}
     2097#endif /* LOG_ENABLED */
    20852098
    20862099
     
    21042117        {
    21052118            int rc = RTDbgModLineAdd(pThis->hCnt, pszFile, pCur->Linenumber, RTDBGSEGIDX_RVA, pCur->Type.VirtualAddress, NULL);
    2106             Log4(("    %#010x: %u  [%Rrc]\n", pCur->Type.VirtualAddress, pCur->Linenumber, rc));
     2119            Log4(("    %#010x: %u  [%Rrc]\n", pCur->Type.VirtualAddress, pCur->Linenumber, rc)); NOREF(rc);
    21072120        }
    21082121        pCur++;
  • trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp

    r57978 r62448  
    10311031#if defined(LOG_ENABLED) || defined(RT_STRICT)
    10321032
     1033# if 0 /* unused */
    10331034/**
    10341035 * Turns a tag value into a string for logging purposes.
     
    10501051    return s_szStatic;
    10511052}
     1053# endif
    10521054
    10531055
  • trunk/src/VBox/Runtime/common/dvm/dvmmbr.cpp

    r57444 r62448  
    216216                                                  bool *pfUsed)
    217217{
    218     PRTDVMFMTINTERNAL pThis = hVolMgrFmt;
    219 
     218    NOREF(hVolMgrFmt);
    220219    NOREF(cbRange);
    221220
    222221    /* MBR uses the first sector only. */
    223     if (off < 512)
    224         *pfUsed = true;
    225     else
    226         *pfUsed = false;
    227 
     222    *pfUsed = off < 512;
    228223    return VINF_SUCCESS;
    229224}
  • trunk/src/VBox/Runtime/common/err/errmsg.cpp

    r57926 r62448  
    7979RTDECL(PCRTSTATUSMSG) RTErrGet(int rc)
    8080{
    81     unsigned iFound = ~0;
     81    unsigned iFound = ~0U;
    8282    unsigned i;
    8383    for (i = 0; i < RT_ELEMENTS(g_aStatusMsgs) - 1; i++)
  • trunk/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h

    r60450 r62448  
    241241            const char *pszName = ELF_STR(pModElf, pSym->st_name);
    242242            RTUINTPTR   ExtValue;
    243             int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0, &ExtValue, pvUser);
     243            int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0U, &ExtValue, pvUser);
    244244            AssertMsgRCReturn(rc, ("Failed to resolve '%s' rc=%Rrc\n", pszName, rc), rc);
    245245            SymValue = (Elf_Addr)ExtValue;
     
    445445            /* Try to resolve the symbol. */
    446446            RTUINTPTR Value;
    447             int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0, &Value, pvUser);
     447            int rc = pfnGetImport(&pModElf->Core, "", pszName, ~0U, &Value, pvUser);
    448448            if (RT_FAILURE(rc))
    449449            {
     
    747747                 */
    748748                AssertMsgReturn(Value == (RTUINTPTR)Value, (FMT_ELF_ADDR "\n", Value), VERR_SYMBOL_VALUE_TOO_BIG);
    749                 rc = pfnCallback(pMod, pszName, ~0, (RTUINTPTR)Value, pvUser);
     749                rc = pfnCallback(pMod, pszName, ~0U, (RTUINTPTR)Value, pvUser);
    750750                if (rc)
    751751                    return rc;
  • trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp

    r61936 r62448  
    673673                     && pThunk->u1.Ordinal < pModPe->cbImage)
    674674            {
    675                 rc = pfnGetImport(&pModPe->Core, pszModName, PE_RVA2TYPE(pvBitsR, (char*)(uintptr_t)pThunk->u1.AddressOfData + 2, const char *),
    676                                   ~0, &Value, pvUser);
     675                rc = pfnGetImport(&pModPe->Core, pszModName,
     676                                  PE_RVA2TYPE(pvBitsR, (char*)(uintptr_t)pThunk->u1.AddressOfData + 2, const char *),
     677                                  ~0U, &Value, pvUser);
    677678                Log4((RT_SUCCESS(rc) ? "RTLdrPE:  %RTptr %s\n" : "RTLdrPE:  %08RX32 %s rc=%Rrc\n",
    678679                      (uint32_t)Value, PE_RVA2TYPE(pvBitsR, (char*)(uintptr_t)pThunk->u1.AddressOfData + 2, const char *), rc));
     
    713714
    714715/** @copydoc RTLDROPSPE::pfnResolveImports */
    715 static DECLCALLBACK(int) rtldrPEResolveImports64(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW, PFNRTLDRIMPORT pfnGetImport, void *pvUser)
     716static DECLCALLBACK(int) rtldrPEResolveImports64(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW,
     717                                                 PFNRTLDRIMPORT pfnGetImport, void *pvUser)
    716718{
    717719    /*
     
    766768                /** @todo add validation of the string pointer! */
    767769                rc = pfnGetImport(&pModPe->Core, pszModName, PE_RVA2TYPE(pvBitsR, (uintptr_t)pThunk->u1.AddressOfData + 2, const char *),
    768                                   ~0, &Value, pvUser);
     770                                  ~0U, &Value, pvUser);
    769771                Log4((RT_SUCCESS(rc) ? "RTLdrPE:  %016RX64 %s\n" : "RTLdrPE:  %016RX64 %s rc=%Rrc\n",
    770772                      (uint64_t)Value, PE_RVA2TYPE(pvBitsR, (uintptr_t)pThunk->u1.AddressOfData + 2, const char *), rc));
     
    788790 * Applies fixups.
    789791 */
    790 static int rtldrPEApplyFixups(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW, RTUINTPTR BaseAddress, RTUINTPTR OldBaseAddress)
     792static int rtldrPEApplyFixups(PRTLDRMODPE pModPe, const void *pvBitsR, void *pvBitsW, RTUINTPTR BaseAddress,
     793                              RTUINTPTR OldBaseAddress)
    791794{
    792795    if (    !pModPe->RelocDir.VirtualAddress
     
    20372040
    20382041
     2042#ifndef IPRT_WITHOUT_LDR_VERIFY
    20392043/**
    20402044 * Returns the digest size for the given digest type.
     
    20542058    }
    20552059}
     2060#endif
    20562061
    20572062
  • trunk/src/VBox/Runtime/common/log/log.cpp

    r62436 r62448  
    474474
    475475    va_start(args, pszFormat);
    476     rtlogLoggerExVLocked(pLogger, 0, ~0, pszFormat, args);
     476    rtlogLoggerExVLocked(pLogger, 0, ~0U, pszFormat, args);
    477477    va_end(args);
    478478}
     
    494494
    495495    va_start(args, pszFormat);
    496     RTLogLoggerExV(pLogger, 0, ~0, pszFormat, args);
     496    RTLogLoggerExV(pLogger, 0, ~0U, pszFormat, args);
    497497    va_end(args);
    498498}
  • trunk/src/VBox/Runtime/common/math/bignum.cpp

    r59747 r62448  
    11011101    {
    11021102        RTBIGNUM_ASSERT_VALID(pLeft);
    1103         if (pLeft->fNegative == (iRight < 0))
     1103        if (pLeft->fNegative == (unsigned)(iRight < 0)) /* (unsigned cast is for MSC weirdness) */
    11041104        {
    11051105            AssertCompile(RTBIGNUM_ELEMENT_SIZE <= sizeof(iRight));
     
    17291729    {
    17301730        int rc = rtBigNumSetUsed(pBigNum, cUsed + 1);
     1731        AssertRCReturn(rc, rc);
    17311732        pBigNum->pauElements[cUsed] = uCarry;
    17321733    }
  • trunk/src/VBox/Runtime/common/net/netaddrstr2.cpp

    r58438 r62448  
    224224         * "::" compressed zero run.
    225225         */
     226        pszNext = NULL; /* (MSC incorrectly thinks it may be used unitialized) */
    226227        for (iGroup = 0; iGroup < 8; ++iGroup)
    227228        {
  • trunk/src/VBox/Runtime/common/path/RTPathExt.cpp

    r57358 r62448  
    6565    }
    6666
    67     /* will never get here */
    68     return NULL;
     67    /* not reached */
    6968}
    7069
  • trunk/src/VBox/Runtime/common/path/RTPathParse.cpp.h

    r56290 r62448  
    209209
    210210                    /* look for an ? */
    211                     uint16_t cDots  = 0;
    212211                    uint32_t offSuffix = offStart + cchComp;
    213212                    while (offSuffix-- > offStart)
  • trunk/src/VBox/Runtime/common/path/RTPathParseSimple.cpp

    r57358 r62448  
    114114
    115115    /* will never get here */
    116     return 0;
    117116}
    118117
  • trunk/src/VBox/Runtime/common/vfs/vfsreadahead.cpp

    r59827 r62448  
    583583            {
    584584
    585                 pBufDesc->off      = RTVfsIoStrmTell(pThis->hIos);
    586                 size_t cbRead      = 0;
    587                 size_t cbToRead    = pThis->cbBuffer;
     585                pBufDesc->off = RTVfsIoStrmTell(pThis->hIos);
     586                size_t cbRead = 0;
    588587                rc = RTVfsIoStrmRead(pThis->hIos, pBufDesc->pbBuffer, pThis->cbBuffer, true /*fBlocking*/, &cbRead);
    589588                if (RT_SUCCESS(rc))
  • trunk/src/VBox/Runtime/common/zip/pkzipvfs.cpp

    r57372 r62448  
    478478    if (RT_SUCCESS(rc))
    479479    {
    480         uint8_t *offStart = pu8Buf;
    481480        pu8Buf += pThis->cdh.cbFilename;
    482481        cb      = pThis->cdh.cbExtra;
     
    767766static DECLCALLBACK(int) rtZipPkzipFssBaseObj_Close(void *pvThis)
    768767{
    769     PRTZIPPKZIPBASEOBJ pThis = (PRTZIPPKZIPBASEOBJ)pvThis;
    770 
     768    NOREF(pvThis);
    771769    return VINF_SUCCESS;
    772770}
  • trunk/src/VBox/Runtime/common/zip/tarcmd.cpp

    r59826 r62448  
    401401}
    402402
     403#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
    403404
    404405/**
     
    463464}
    464465
     466#endif /* !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2) */
    465467
    466468
     
    596598                              rc, pszName);
    597599
    598     const char *pszLinkType = NULL;
    599600    char szTarget[RTPATH_MAX];
    600601    szTarget[0] = '\0';
  • trunk/src/VBox/Runtime/common/zip/unzipcmd.cpp

    r57358 r62448  
    477477            return rtZipUnzipDoWithMembers(&Opts, rtZipUnzipCmdExtractCallback, &cFiles, &cBytes);
    478478    }
    479 
    480     return RTEXITCODE_SUCCESS;
    481 }
     479}
  • trunk/src/VBox/Runtime/common/zip/zip.cpp

    r60048 r62448  
    531531            return zipErrConvertFromZlib(rc, true /*fCompressing*/);
    532532    }
    533     return VINF_SUCCESS;
    534533}
    535534
  • trunk/src/VBox/Runtime/generic/RTPathIsSame-generic.cpp

    r57358 r62448  
    5252     * If the files exist, try use the attributes.
    5353     */
    54     RTFSOBJINFO ObjInfo1, ObjInfo2;
     54    RTFSOBJINFO ObjInfo1;
    5555    int rc = RTPathQueryInfoEx(pszPath1, &ObjInfo1, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
    5656    if (RT_SUCCESS(rc))
     57    {
     58        RTFSOBJINFO ObjInfo2;
    5759        rc = RTPathQueryInfoEx(pszPath2, &ObjInfo2, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
    58     if (RT_SUCCESS(rc))
    59     {
    60         if ((ObjInfo1.Attr.fMode & RTFS_TYPE_MASK) != (ObjInfo2.Attr.fMode & RTFS_TYPE_MASK))
    61             return false;
    62         if (ObjInfo1.Attr.u.Unix.INodeIdDevice       != ObjInfo2.Attr.u.Unix.INodeIdDevice)
    63             return false;
    64         if (ObjInfo1.Attr.u.Unix.INodeId             != ObjInfo2.Attr.u.Unix.INodeId)
    65             return false;
    66         if (ObjInfo1.Attr.u.Unix.GenerationId        != ObjInfo2.Attr.u.Unix.GenerationId)
    67             return false;
    68         if (   ObjInfo1.Attr.u.Unix.INodeIdDevice != 0
    69             && ObjInfo1.Attr.u.Unix.INodeId       != 0)
    70             return true;
     60        if (RT_SUCCESS(rc))
     61        {
     62            if ((ObjInfo1.Attr.fMode & RTFS_TYPE_MASK) != (ObjInfo2.Attr.fMode & RTFS_TYPE_MASK))
     63                return false;
     64            if (ObjInfo1.Attr.u.Unix.INodeIdDevice       != ObjInfo2.Attr.u.Unix.INodeIdDevice)
     65                return false;
     66            if (ObjInfo1.Attr.u.Unix.INodeId             != ObjInfo2.Attr.u.Unix.INodeId)
     67                return false;
     68            if (ObjInfo1.Attr.u.Unix.GenerationId        != ObjInfo2.Attr.u.Unix.GenerationId)
     69                return false;
     70            if (   ObjInfo1.Attr.u.Unix.INodeIdDevice != 0
     71                && ObjInfo1.Attr.u.Unix.INodeId       != 0)
     72                return true;
     73        }
    7174    }
    7275
  • trunk/src/VBox/Runtime/generic/critsectrw-generic.cpp

    r59039 r62448  
    575575        uint32_t cNestings = ASMAtomicIncU32(&pThis->cWriteRecursions); NOREF(cNestings);
    576576
     577#ifdef IPRT_WITH_DTRACE
    577578        if (IPRT_CRITSECTRW_EXCL_ENTERED_ENABLED())
    578579        {
     
    582583                                         (uint32_t)((u64State & RTCSRW_CNT_WR_MASK) >> RTCSRW_CNT_WR_SHIFT));
    583584        }
     585#endif
    584586        return VINF_SUCCESS;
    585587    }
     
    879881#endif
    880882        uint32_t cNestings = ASMAtomicDecU32(&pThis->cWriteRecursions); NOREF(cNestings);
     883#ifdef IPRT_WITH_DTRACE
    881884        if (IPRT_CRITSECTRW_EXCL_LEAVING_ENABLED())
    882885        {
     
    886889                                         (uint32_t)((u64State & RTCSRW_CNT_WR_MASK) >> RTCSRW_CNT_WR_SHIFT));
    887890        }
     891#endif
    888892    }
    889893
  • trunk/src/VBox/Runtime/generic/env-generic.cpp

    r57835 r62448  
    235235    const char * const *papszEnv;
    236236#ifdef RTENV_HAVE_WENVIRON
    237     PCRTUTF16 const * papwszEnv;
     237    PCRTUTF16 const * papwszEnv = NULL;
    238238#endif
    239239    PRTENVINTERNAL pIntEnvToClone;
  • trunk/src/VBox/Runtime/generic/semrw-generic.cpp

    r57358 r62448  
    203203             */
    204204            ASMAtomicWriteU32(&pThis->u32Magic, ~RTSEMRW_MAGIC);
    205             pThis->cReads = ~0;
     205            pThis->cReads = UINT32_MAX;
    206206
    207207            /*
  • trunk/src/VBox/Runtime/generic/timerlr-generic.cpp

    r57358 r62448  
    262262        ASMAtomicWriteU64(&pThis->u64NextTS, u64Now);
    263263        ASMAtomicWriteU64(&pThis->u64NanoInterval, u64NanoInterval);
    264         int rc = RTSemEventSignal(pThis->hEvent);
     264        RTSemEventSignal(pThis->hEvent);
    265265    }
    266266
  • trunk/src/VBox/Runtime/r0drv/nt/ntBldSymDb.cpp

    r57978 r62448  
    471471
    472472
     473#if 0
    473474/**
    474475 * Resets the writable structure members prior to processing a PDB.
     
    491492    }
    492493}
     494#endif
    493495
    494496
     
    690692
    691693
     694#if 0 /* unused */
    692695static bool strIEndsWith(const char *pszString, const char *pszSuffix)
    693696{
     
    698701    return RTStrICmp(pszString + cchString - cchSuffix, pszSuffix) == 0;
    699702}
     703#endif
    700704
    701705
     
    754758     *  - en_windows_8_1_symbols_debug_checked_x64_2712568
    755759     */
    756     bool fFound = false;
    757760    uint32_t i = u.Split.cComps - 1;
    758761    while (i-- > 0)
  • trunk/src/VBox/Runtime/r3/win/errvars-win.cpp

    r57358 r62448  
    7777
    7878    return pVars->ai32Vars[0] != RTERRVARS_MAGIC
    79         || pVars->ai32Vars[1] != GetLastError()
     79        || (uint32_t)pVars->ai32Vars[1] != GetLastError()
    8080        || pVars->ai32Vars[2] != WSAGetLastError()
    8181        || pVars->ai32Vars[3] != errno;
  • trunk/src/VBox/Runtime/r3/win/ldrNative-win.cpp

    r61989 r62448  
    245245                 */
    246246                unsigned cMatchingComponents = 0;
    247                 unsigned cSlashes = 0;
    248247                size_t   off = 0;
    249248                while (off < pUniStrResult->Length)
  • trunk/src/VBox/Runtime/r3/win/localipc-win.cpp

    r58305 r62448  
    11231123                    else if (GetLastError() == ERROR_IO_PENDING)
    11241124                    {
    1125                         DWORD rcWait = WaitForSingleObject(pThis->Read.OverlappedIO.hEvent, INFINITE);
     1125                        WaitForSingleObject(pThis->Read.OverlappedIO.hEvent, INFINITE);
    11261126
    11271127                        RTCritSectEnter(&pThis->CritSect);
     
    15531553                 * Check for timeout.
    15541554                 */
    1555                 DWORD cMsMaxWait;
     1555                DWORD cMsMaxWait = INFINITE; /* (MSC maybe used uninitialized) */
    15561556                if (cMillies == RT_INDEFINITE_WAIT)
    15571557                    cMsMaxWait = INFINITE;
  • trunk/src/VBox/Runtime/r3/win/pipe-win.cpp

    r57643 r62448  
    127127} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
    128128
    129 #define FILE_PIPE_DISCONNECTED_STATE    0x00000001
    130 #define FILE_PIPE_LISTENING_STATE       0x00000002
    131 #define FILE_PIPE_CONNECTED_STATE       0x00000003
    132 #define FILE_PIPE_CLOSING_STATE         0x00000004
    133 
    134 #define FILE_PIPE_INBOUND               0x00000000
    135 #define FILE_PIPE_OUTBOUND              0x00000001
    136 #define FILE_PIPE_FULL_DUPLEX           0x00000002
    137 
    138 #define FILE_PIPE_CLIENT_END            0x00000000
    139 #define FILE_PIPE_SERVER_END            0x00000001
     129#define FILE_PIPE_DISCONNECTED_STATE    0x00000001U
     130#define FILE_PIPE_LISTENING_STATE       0x00000002U
     131#define FILE_PIPE_CONNECTED_STATE       0x00000003U
     132#define FILE_PIPE_CLOSING_STATE         0x00000004U
     133
     134#define FILE_PIPE_INBOUND               0x00000000U
     135#define FILE_PIPE_OUTBOUND              0x00000001U
     136#define FILE_PIPE_FULL_DUPLEX           0x00000002U
     137
     138#define FILE_PIPE_CLIENT_END            0x00000000U
     139#define FILE_PIPE_SERVER_END            0x00000001U
    140140
    141141extern "C" NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, LONG, FILE_INFORMATION_CLASS);
     
    858858                    HANDLE hEvent = pThis->Overlapped.hEvent;
    859859                    RTCritSectLeave(&pThis->CritSect);
    860                     WaitForSingleObject(pThis->Overlapped.hEvent, INFINITE);
     860                    WaitForSingleObject(hEvent, INFINITE);
    861861                    RTCritSectEnter(&pThis->CritSect);
    862862                }
     
    928928    return rc;
    929929
    930 #if 1
    931     return VERR_NOT_IMPLEMENTED;
    932 #else
     930#if 0 /** @todo r=bird: What's this? */
    933931    int rc = rtPipeTryBlocking(pThis);
    934932    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Runtime/r3/win/process-win.cpp

    r60054 r62448  
    500500    int    rc              = VINF_SUCCESS;
    501501    DWORD  cbPidsAllocated = 4096;
    502     DWORD  cbPidsReturned;
     502    DWORD  cbPidsReturned  = 0; /* (MSC maybe used uninitialized) */
    503503    DWORD *paPids;
    504504    for (;;)
     
    20792079     * UTF-16 environment block.
    20802080     */
    2081     RTENV hEnvToUse;
     2081    RTENV hEnvToUse = NIL_RTENV; /* (MSC maybe used uninitialized) */
    20822082    if (   !(fFlags & (RTPROC_FLAGS_PROFILE | RTPROC_FLAGS_ENV_CHANGE_RECORD))
    20832083        || (hEnv == RTENV_DEFAULT && !(fFlags & RTPROC_FLAGS_PROFILE))
  • trunk/src/VBox/Runtime/r3/win/sched-win.cpp

    r57358 r62448  
    6565        RTTHREADTYPE    enmType;
    6666        /** The Win32 thread priority. */
    67         DWORD           dwThreadPriority;
     67        int             iThreadPriority;
    6868    } aTypes[RTTHREADTYPE_END];
    6969} PROCPRIORITY;
     
    313313
    314314#ifdef WIN32_SCHED_ENABLED
    315     if (SetThreadPriority(rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].dwThreadPriority))
     315    if (SetThreadPriority(rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].iThreadPriority))
    316316        return VINF_SUCCESS;
    317317
     
    319319    int rc = RTErrConvertFromWin32(dwLastError);
    320320    AssertMsgFailed(("SetThreadPriority(%p, %d) failed, dwLastError=%d rc=%Rrc\n",
    321                      rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].dwThreadPriority, dwLastError, rc));
     321                     rtThreadNativeGetHandle(pThread), g_pProcessPriority->aTypes[enmType].iThreadPriority, dwLastError, rc));
    322322    return rc;
    323323#else
  • trunk/src/VBox/Runtime/r3/win/timer-win.cpp

    r57358 r62448  
    286286     * we start the timer.
    287287     */
    288     ULONG ulMax = ~0;
    289     ULONG ulMin = ~0;
    290     ULONG ulCur = ~0;
     288    ULONG ulMax = UINT32_MAX;
     289    ULONG ulMin = UINT32_MAX;
     290    ULONG ulCur = UINT32_MAX;
    291291    NtQueryTimerResolution(&ulMax, &ulMin, &ulCur);
    292292    Log(("NtQueryTimerResolution -> ulMax=%lu00ns ulMin=%lu00ns ulCur=%lu00ns\n", ulMax, ulMin, ulCur));
     
    312312     * Create new timer.
    313313     */
    314     int rc;
     314    int rc = VERR_IPE_UNINITIALIZED_STATUS;
    315315    PRTTIMER pTimer = (PRTTIMER)RTMemAlloc(sizeof(*pTimer));
    316316    if (pTimer)
     
    326326        if (pTimer->TimerId)
    327327        {
    328             ULONG ulMax = ~0;
    329             ULONG ulMin = ~0;
    330             ULONG ulCur = ~0;
     328            ULONG ulMax = UINT32_MAX;
     329            ULONG ulMin = UINT32_MAX;
     330            ULONG ulCur = UINT32_MAX;
    331331            NtQueryTimerResolution(&ulMax, &ulMin, &ulCur);
    332332            Log(("NtQueryTimerResolution -> ulMax=%lu00ns ulMin=%lu00ns ulCur=%lu00ns\n", ulMax, ulMin, ulCur));
     
    342342         * Create Win32 event semaphore.
    343343         */
    344         pTimer->iError      = 0;
     344        pTimer->iError = 0;
    345345        pTimer->hTimer = CreateWaitableTimer(NULL, TRUE, NULL);
    346346        if (pTimer->hTimer)
     
    441441        rc = RTThreadWait(pTimer->Thread, 1000, NULL);
    442442        if (RT_FAILURE(rc))
    443             TerminateThread((HANDLE)RTThreadGetNative(pTimer->Thread), -1);
     443            TerminateThread((HANDLE)RTThreadGetNative(pTimer->Thread), UINT32_MAX);
    444444
    445445        /*
  • trunk/src/VBox/Runtime/tools/RTSignTool.cpp

    r60946 r62448  
    648648    };
    649649
    650     RTLDRARCH       enmLdrArch = RTLDRARCH_WHATEVER;
    651650    MAKETAINFOSTATE State = { 0, NULL, NULL };
    652651
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