VirtualBox

Changeset 63176 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 8, 2016 2:54:57 PM (8 years ago)
Author:
vboxsync
Message:

Main: warnings

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/PerformanceImpl.h

    r62485 r63176  
    171171    typedef std::list<pm::BaseMetric*> BaseMetricList;
    172172
    173     enum
    174     {
    175         MAGIC = 0xABBA1972u
    176     };
    177 
    178     unsigned int mMagic;
     173/** PerformanceMetric::mMagic value. */
     174#define PERFORMANCE_METRIC_MAGIC    UINT32_C(0xABBA1972)
     175    uint32_t mMagic;
    179176    const Utf8Str mUnknownGuest;
    180177
  • trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp

    r61986 r63176  
    316316
    317317            default:
    318                 AssertMsgFailed(("Wrong audio controller type %d\n",
    319                                  aAudioController));
     318                AssertMsgFailed(("Wrong audio controller type %d\n", aAudioController));
     319                defaultCodec = AudioCodecType_Null; /* Shut up MSC */
    320320                rc = E_FAIL;
    321321        }
  • trunk/src/VBox/Main/src-server/PerformanceImpl.cpp

    r62485 r63176  
    187187
    188188    /* Let the sampler know it gets a valid collector.  */
    189     mMagic = MAGIC;
     189    mMagic = PERFORMANCE_METRIC_MAGIC;
    190190
    191191    /* Start resource usage sampler */
     
    640640    AssertReturnVoid(pvUser != NULL);
    641641    PerformanceCollector *collector = static_cast <PerformanceCollector *> (pvUser);
    642     Assert(collector->mMagic == MAGIC);
    643     if (collector->mMagic == MAGIC)
     642    Assert(collector->mMagic == PERFORMANCE_METRIC_MAGIC);
     643    if (collector->mMagic == PERFORMANCE_METRIC_MAGIC)
    644644        collector->samplerCallback(iTick);
    645645
  • trunk/src/VBox/Main/src-server/win/NetIf-win.cpp

    r62780 r63176  
    196196                    pInfo->enmMediumType = NETIF_T_ETHERNET;
    197197                    pInfo->enmStatus = pAdapter->OperStatus == IfOperStatusUp ? NETIF_S_UP : NETIF_S_DOWN;
    198                     pInfo->bIsDefault = (pAdapter->IfIndex == iDefault);
     198                    pInfo->bIsDefault = (pAdapter->IfIndex == (DWORD)iDefault);
    199199                    RTStrFree(pszUuid);
    200200                    break;
     
    981981        if (hr == S_OK)
    982982        {
     983            Guid guidIfCopy(IfGuid);
    983984            NETIFINFO Info;
    984985            RT_ZERO(Info);
    985             Info.Uuid = *(Guid(IfGuid).raw());
    986             rc = collectNetIfInfo(name, Guid(IfGuid), &Info, iDefaultInterface);
     986            Info.Uuid = *guidIfCopy.raw();
     987            rc = collectNetIfInfo(name, guidIfCopy, &Info, iDefaultInterface);
    987988            if (RT_FAILURE(rc))
    988             {
    989989                LogRel(("vboxNetWinAddComponent: collectNetIfInfo() -> %Rrc\n", rc));
    990             }
    991990            Log(("vboxNetWinAddComponent: adding %ls\n", lpszName));
    992991            /* create a new object and add it to the list */
     
    18651864                {
    18661865                    info.enmStatus = pAdapter->OperStatus == IfOperStatusUp ? NETIF_S_UP : NETIF_S_DOWN;
    1867                     info.bIsDefault = (pAdapter->IfIndex == iDefault);
     1866                    info.bIsDefault = (pAdapter->IfIndex == (DWORD)iDefault);
    18681867                    info.bDhcpEnabled = pAdapter->Flags & IP_ADAPTER_DHCP_ENABLED;
    18691868                    netIfFillInfoWithAddresses(&info, pAdapter);
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