VirtualBox

Changeset 13977 in vbox for trunk/src


Ignore:
Timestamp:
Nov 7, 2008 8:14:23 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
39016
Message:

C warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/uuid-generic.cpp

    r11413 r13977  
    105105RTDECL(int)  RTUuidCompareStr(PCRTUUID pUuid1, const char *pszString)
    106106{
     107    RTUUID Uuid2;
     108    int rc;
     109
    107110    /* check params */
    108111    AssertPtrReturn(pUuid1, -1);
     
    112115     * Try convert the string to a UUID and then compare the two.
    113116     */
    114     RTUUID Uuid2;
    115     int rc = RTUuidFromStr(&Uuid2, pszString);
     117    rc = RTUuidFromStr(&Uuid2, pszString);
    116118    AssertRCReturn(rc, 1);
    117119
     
    122124RTDECL(int)  RTUuidToStr(PCRTUUID pUuid, char *pszString, size_t cchString)
    123125{
     126    static const char s_achDigits[17] = "0123456789abcdef";
     127    uint32_t u32TimeLow;
     128    unsigned u;
     129
    124130    /* validate parameters */
    125131    AssertPtrReturn(pUuid, VERR_INVALID_PARAMETER);
     
    141147     *             pUuid->Gen.au8Node[5]);
    142148     */
    143     static const char s_achDigits[17] = "0123456789abcdef";
    144     uint32_t u32TimeLow = pUuid->Gen.u32TimeLow;
     149    u32TimeLow = pUuid->Gen.u32TimeLow;
    145150    pszString[ 0] = s_achDigits[(u32TimeLow >> 28)/*& 0xf*/];
    146151    pszString[ 1] = s_achDigits[(u32TimeLow >> 24) & 0xf];
     
    152157    pszString[ 7] = s_achDigits[(u32TimeLow/*>>0*/)& 0xf];
    153158    pszString[ 8] = '-';
    154     unsigned u = pUuid->Gen.u16TimeMid;
     159    u = pUuid->Gen.u16TimeMid;
    155160    pszString[ 9] = s_achDigits[(u >> 12)/*& 0xf*/];
    156161    pszString[10] = s_achDigits[(u >>  8) & 0xf];
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