VirtualBox

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


Ignore:
Timestamp:
Mar 1, 2023 4:38:03 PM (21 months ago)
Author:
vboxsync
Message:

Some small Solaris-specific build warning fixes:

Main/Console: Remove a duplicate 'HRESULT hrc' declaration (flagged as
'warning: declaration of ‘hrc’ shadows a previous local [-Wshadow]').

Main/PerformanceSolaris: Move global variable ‘g_fNotReported’ behind
'if ARCH_BITS == 32' as it's only used in 32-bit mode (flagged as
'warning: ‘g_fNotReported’ defined but not used [-Wunused-variable]').

HostDrivers/VBoxNetFlt: The vboxNetFltSolarisMuxIdToFd() routine calls
the Solaris STREAMS kernel routine strioctl() which only sets the
seventh argument (int *rvalp) upon success. vboxNetFltSolarisMuxIdToFd()
passes in an 'int *pFd' argument for this returned value and logically
only sets it upon success. The subsequent code ignores 'pFd' upon
failure but the compiler isn't smart enough to figure that out so add in
an initialization for '*pFd' (flagged as 'warning: ‘Ip6MuxFd’ may be used
uninitialized [-Wmaybe-uninitialized]' and similarly for 'Ip4MuxFd' and
'ArpMuxFd').

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r98706 r98807  
    85008500        /* setup host core dumper for the VM */
    85018501        Bstr value;
    8502         HRESULT hrc = mMachine->GetExtraData(Bstr("VBoxInternal2/CoreDumpEnabled").raw(), value.asOutParam());
     8502        hrc = mMachine->GetExtraData(Bstr("VBoxInternal2/CoreDumpEnabled").raw(), value.asOutParam());
    85038503        if (SUCCEEDED(hrc) && value == "1")
    85048504        {
  • trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp

    r98292 r98807  
    389389int CollectorSolaris::getRawHostNetworkLoad(const char *name, uint64_t *rx, uint64_t *tx)
    390390{
     391#if ARCH_BITS == 32
    391392    static bool g_fNotReported = true;
     393#endif
    392394    AssertReturn(strlen(name) < KSTAT_STRLEN, VERR_INVALID_PARAMETER);
    393395    LogFlowThisFunc(("m=%s i=%d n=%s\n", "link", -1, name));
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