VirtualBox

Changeset 14070

Show
Ignore:
Timestamp:
11/11/08 00:45:24 (2 months ago)
Author:
vboxsync
Message:

CFGM: 64-bit MSC warning hunt.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/VBox/cfgm.h

    r12989 r14070  
    171171VMMR3DECL(PCFGMNODE)    CFGMR3GetNextChild(PCFGMNODE pCur); 
    172172VMMR3DECL(int)          CFGMR3GetName(PCFGMNODE pCur, char *pszName, size_t cchName); 
    173 VMMR3DECL(int)          CFGMR3GetNameLen(PCFGMNODE pCur); 
     173VMMR3DECL(size_t)       CFGMR3GetNameLen(PCFGMNODE pCur); 
    174174VMMR3DECL(bool)         CFGMR3AreChildrenValid(PCFGMNODE pNode, const char *pszzValid); 
    175175VMMR3DECL(PCFGMLEAF)    CFGMR3GetFirstValue(PCFGMNODE pCur); 
    176176VMMR3DECL(PCFGMLEAF)    CFGMR3GetNextValue(PCFGMLEAF pCur); 
    177177VMMR3DECL(int)          CFGMR3GetValueName(PCFGMLEAF pCur, char *pszName, size_t cchName); 
    178 VMMR3DECL(int)          CFGMR3GetValueNameLen(PCFGMLEAF pCur); 
     178VMMR3DECL(size_t)       CFGMR3GetValueNameLen(PCFGMLEAF pCur); 
    179179VMMR3DECL(CFGMVALUETYPE) CFGMR3GetValueType(PCFGMLEAF pCur); 
    180180VMMR3DECL(bool)         CFGMR3AreValuesValid(PCFGMNODE pNode, const char *pszzValid); 
  • trunk/src/VBox/VMM/CFGM.cpp

    r13840 r14070  
    339339 *                          or successive calls to CFGMR3GetNextChild(). 
    340340 */ 
    341 VMMR3DECL(int) CFGMR3GetNameLen(PCFGMNODE pCur) 
     341VMMR3DECL(size_t) CFGMR3GetNameLen(PCFGMNODE pCur) 
    342342{ 
    343343    return pCur ? pCur->cchName + 1 : 0; 
     
    448448 *                          or successive calls to CFGMR3GetNextValue(). 
    449449 */ 
    450 VMMR3DECL(int) CFGMR3GetValueNameLen(PCFGMLEAF pCur) 
     450VMMR3DECL(size_t) CFGMR3GetValueNameLen(PCFGMLEAF pCur) 
    451451{ 
    452452    return pCur ? pCur->cchName + 1 : 0; 
    453453} 
     454 
    454455 
    455456/** 
     
    10731074    if (pNode) 
    10741075    { 
    1075         RTUINT      cchName = strlen(pszName); 
     1076        size_t      cchName = strlen(pszName); 
    10761077        PCFGMLEAF   pLeaf = pNode->pFirstLeaf; 
    10771078        while (pLeaf) 
     
    25162517     */ 
    25172518    PCFGMLEAF pLeaf; 
    2518     unsigned cchMax = 0; 
     2519    size_t cchMax = 0; 
    25192520    for (pLeaf = CFGMR3GetFirstValue(pRoot); pLeaf; pLeaf = CFGMR3GetNextValue(pLeaf)) 
    25202521        cchMax = RT_MAX(cchMax, pLeaf->cchName); 
     
    25242525        { 
    25252526            case CFGMVALUETYPE_INTEGER: 
    2526                 pHlp->pfnPrintf(pHlp, "  %-*s <integer> = %#018llx (%lld)\n", cchMax, pLeaf->szName, pLeaf->Value.Integer.u64, pLeaf->Value.Integer.u64); 
     2527                pHlp->pfnPrintf(pHlp, "  %-*s <integer> = %#018llx (%lld)\n", (int)cchMax, pLeaf->szName, pLeaf->Value.Integer.u64, pLeaf->Value.Integer.u64); 
    25272528                break; 
    25282529 
    25292530            case CFGMVALUETYPE_STRING: 
    2530                 pHlp->pfnPrintf(pHlp, "  %-*s <string>  = \"%s\" (cch=%d)\n", cchMax, pLeaf->szName, pLeaf->Value.String.psz, pLeaf->Value.String.cch); 
     2531                pHlp->pfnPrintf(pHlp, "  %-*s <string>  = \"%s\" (cch=%d)\n", (int)cchMax, pLeaf->szName, pLeaf->Value.String.psz, pLeaf->Value.String.cch); 
    25312532                break; 
    25322533 
    25332534            case CFGMVALUETYPE_BYTES: 
    2534                 pHlp->pfnPrintf(pHlp, "  %-*s <bytes>   = \"%.*Rhxs\" (cb=%d)\n", cchMax, pLeaf->szName, pLeaf->Value.Bytes.cb, pLeaf->Value.Bytes.pau8, pLeaf->Value.Bytes.cb); 
     2535                pHlp->pfnPrintf(pHlp, "  %-*s <bytes>   = \"%.*Rhxs\" (cb=%d)\n", (int)cchMax, pLeaf->szName, pLeaf->Value.Bytes.cb, pLeaf->Value.Bytes.pau8, pLeaf->Value.Bytes.cb); 
    25352536                break; 
    25362537 
  • trunk/src/VBox/VMM/CFGMInternal.h

    r12635 r14070  
    4949    { 
    5050        /** Length of string. (In bytes, including the terminator.) */ 
    51         RTUINT          cch; 
     51        size_t          cch; 
    5252        /** Pointer to the string. */ 
    5353        char           *psz; 
     
    5858    { 
    5959        /** Length of byte string. (in bytes) */ 
    60         RTUINT          cb; 
     60        size_t          cb; 
    6161        /** Pointer to the byte string. */ 
    6262        uint8_t        *pau8; 
     
    8383 
    8484    /** Name length. (exclusive) */ 
    85     RTUINT          cchName; 
     85    size_t          cchName; 
    8686    /** Name. */ 
    8787    char            szName[1]; 
     
    114114 
    115115    /** Name length. (exclusive) */ 
    116     RTUINT          cchName; 
     116    size_t          cchName; 
    117117    /** Name. */ 
    118118    char            szName[1]; 
  • trunk/src/VBox/VMM/PDMDevice.cpp

    r13818 r14070  
    496496        if (rc == VERR_CFGM_NOT_ENOUGH_SPACE) 
    497497        { 
    498             AssertMsgFailed(("configuration error: The module name is too long, cchName=%d.\n", CFGMR3GetNameLen(pCur))); 
     498            AssertMsgFailed(("configuration error: The module name is too long, cchName=%zu.\n", CFGMR3GetNameLen(pCur))); 
    499499            return VERR_PDM_MODULE_NAME_TOO_LONG; 
    500500        } 
  • trunk/src/VBox/VMM/PDMDriver.cpp

    r13818 r14070  
    175175        if (rc == VERR_CFGM_NOT_ENOUGH_SPACE) 
    176176        { 
    177             AssertMsgFailed(("configuration error: The module name is too long, cchName=%d.\n", CFGMR3GetNameLen(pCur))); 
     177            AssertMsgFailed(("configuration error: The module name is too long, cchName=%zu.\n", CFGMR3GetNameLen(pCur))); 
    178178            return VERR_PDM_MODULE_NAME_TOO_LONG; 
    179179        } 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy