VirtualBox

Changeset 63170 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 8, 2016 2:38:58 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109788
Message:

Main: warning about switches

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/QMTranslatorImpl.cpp

    r62485 r63170  
    192192            uint32_t hash = calculateHash(pszSource, pszDisamb);
    193193            lowerIter = m_hashSet.lower_bound(HashOffset(hash, 0));
    194             upperIter = m_hashSet.upper_bound(HashOffset(hash, ~0));
     194            upperIter = m_hashSet.upper_bound(HashOffset(hash, UINT32_MAX));
    195195
    196196            for (iter = lowerIter; iter != upperIter; ++iter)
  • trunk/src/VBox/Main/src-server/ApplianceImpl.cpp

    r61003 r63170  
    16581658                if (d.strRef == strRef)
    16591659                    return &d;
    1660             break;
     1660                break;
     1661            default: break; /* Shut up MSC. */
    16611662        }
    16621663    }
  • trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp

    r62485 r63170  
    207207        if (!pIDEController.isNull())
    208208        {
    209             Utf8Str strVBox;
    210209            StorageControllerType_T ctlr;
    211210            rc = pIDEController->COMGETTER(ControllerType)(&ctlr);
    212211            if (FAILED(rc)) throw rc;
    213             switch(ctlr)
     212
     213            Utf8Str strVBox;
     214            switch (ctlr)
    214215            {
    215216                case StorageControllerType_PIIX3: strVBox = "PIIX3"; break;
    216217                case StorageControllerType_PIIX4: strVBox = "PIIX4"; break;
    217218                case StorageControllerType_ICH6: strVBox = "ICH6"; break;
     219                default: break; /* Shut up MSC. */
    218220            }
    219221
     
    252254            {
    253255                Utf8Str strVBox = "LsiLogic";       // the default in VBox
    254                 switch(ctlr)
     256                switch (ctlr)
    255257                {
    256258                    case StorageControllerType_LsiLogic: strVBox = "LsiLogic"; break;
    257259                    case StorageControllerType_BusLogic: strVBox = "BusLogic"; break;
     260                    default: break; /* Shut up MSC. */
    258261                }
    259262                lSCSIControllerIndex = (int32_t)pNewDesc->m->maDescriptions.size();
     
    519522                                        (uint32_t)(llSize / _1M),
    520523                                         strExtra);
    521                 break;
     524                    break;
    522525
    523526                case DeviceType_DVD:
     
    529532                                         (uint32_t)(llSize / _1M),// ulSize
    530533                                         strExtra);
    531                 break;
     534                    break;
    532535
    533536                case DeviceType_Floppy:
     
    538541                                         1,       // ulSize
    539542                                         strExtra);
    540                 break;
     543                    break;
     544
     545                default: break; /* Shut up MSC. */
    541546            }
    542547        }
     
    13731378                                                                                          // won't eat the item
    13741379                    }
    1375                 break;
     1380                    break;
    13761381
    13771382                case VirtualSystemDescriptionType_HardDiskControllerIDE:
     
    14111416                        }
    14121417                    }
    1413                 break;
     1418                    break;
    14141419
    14151420                case VirtualSystemDescriptionType_HardDiskControllerSATA:
     
    14461451                        lSATAControllerIndex = lIndexThis;
    14471452                    }
    1448                 break;
     1453                    break;
    14491454
    14501455                case VirtualSystemDescriptionType_HardDiskControllerSCSI:
     
    14871492                        lSCSIControllerIndex = lIndexThis;
    14881493                    }
    1489                 break;
     1494                    break;
    14901495
    14911496                case VirtualSystemDescriptionType_HardDiskImage:
     
    15421547                        stack.mapDisks[strDiskID] = &desc;
    15431548                    }
    1544                 break;
     1549                    break;
    15451550
    15461551                case VirtualSystemDescriptionType_Floppy:
     
    15531558                        lAddressOnParent = 0;           // this is what OVFTool writes
    15541559                    }
    1555                 break;
     1560                    break;
    15561561
    15571562                case VirtualSystemDescriptionType_CDROM:
     
    16161621                        // handled completely with this entry.
    16171622                    }
    1618                 break;
     1623                    break;
    16191624
    16201625                case VirtualSystemDescriptionType_NetworkAdapter:
     
    16501655                        stack.mapNetworks[desc.strOvf] = true;
    16511656                    }
    1652                 break;
     1657                    break;
    16531658
    16541659                case VirtualSystemDescriptionType_USBController:
     
    16691674                        lBusNumber = 0;                 // this is what OVFTool writes
    16701675                    }
    1671                 break;
     1676                    break;
    16721677
    16731678                case VirtualSystemDescriptionType_SoundCard:
     
    16901695                        lAddressOnParent = 3;               // what gives? this is what OVFTool writes
    16911696                    }
    1692                 break;
     1697                    break;
     1698
     1699                default: break; /* Shut up MSC. */
    16931700            }
    16941701
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