VirtualBox

Changeset 3320 in vbox


Ignore:
Timestamp:
Jun 27, 2007 3:12:10 PM (17 years ago)
Author:
vboxsync
Message:

Main: Fixed unsigned/signed warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r3317 r3320  
    10731073
    10741074    /* try to guess the probe order by extension */
    1075     size_t first = -1;
     1075    size_t first = 0;
     1076    bool haveFirst = false;
    10761077    Utf8Str loc = aLocation;
    10771078    char *ext = RTPathExt (loc);
     
    10821083        {
    10831084            first = i;
     1085            haveFirst = true;
    10841086            break;
    10851087        }
     
    10931095    for (size_t i = 0; i < ELEMENTS (storageTypes); ++ i)
    10941096    {
    1095         size_t j = first == -1 ? i : i == 0 ? first : i == first ? 0 : i;
     1097        size_t j = !haveFirst ? i : i == 0 ? first : i == first ? 0 : i;
    10961098        switch (storageTypes [j].type)
    10971099        {
     
    11301132        Assert (FAILED (rc));
    11311133
    1132         /* remember the first encountered error */
    1133         if (j == first)
     1134        /* remember the error of the matching class */
     1135        if (haveFirst && j == first)
    11341136        {
    11351137            firstRC = rc;
     
    11381140    }
    11391141
    1140     if (first != -1)
     1142    if (haveFirst)
    11411143    {
    11421144        Assert (FAILED (firstRC));
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