VirtualBox

Changeset 85222 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jul 11, 2020 4:16:39 PM (4 years ago)
Author:
vboxsync
Message:

Main/ovfreader: Clang 11 complains about a bunch of unused members, so I've #if'ed them out. Also a signedness issue with line numbers. Cleaned up some modernistic/random continuation indentation. bugref:9790

File:
1 edited

Legend:

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

    r84532 r85222  
    335335    bool fResourceRequired;
    336336
    337     RTCString strHostResource;   // "Abstractly specifies how a device shall connect to a resource on the deployment platform.
    338                                         // Not all devices need a backing." Used with disk items, for which this references a virtual
    339                                         // disk from the Disks section.
     337    RTCString strHostResource;   ///< "Abstractly specifies how a device shall connect to a resource on the deployment platform.
     338                                 /// Not all devices need a backing." Used with disk items, for which this
     339                                 /// references a virtual disk from the Disks section.
    340340    bool fAutomaticAllocation;
    341341    bool fAutomaticDeallocation;
    342     RTCString strConnection;     // "All Ethernet adapters that specify the same abstract network connection name within an OVF
    343                                         // package shall be deployed on the same network. The abstract network connection name shall be
    344                                         // listed in the NetworkSection at the outermost envelope level." We ignore this and only set up
    345                                         // a network adapter depending on the network name.
    346     RTCString strAddress;        // "Device-specific. For an Ethernet adapter, this specifies the MAC address."
    347     int32_t lAddress;                   // strAddress as an integer, if applicable.
    348     RTCString strAddressOnParent;         // "For a device, this specifies its location on the controller."
    349     RTCString strAllocationUnits;         // "Specifies the units of allocation used. For example, “byte * 2^20”."
    350     uint64_t ullVirtualQuantity;        // "Specifies the quantity of resources presented. For example, “256”."
    351     uint64_t ullReservation;            // "Specifies the minimum quantity of resources guaranteed to be available."
    352     uint64_t ullLimit;                  // "Specifies the maximum quantity of resources that will be granted."
    353     uint64_t ullWeight;                 // "Specifies a relative priority for this allocation in relation to other allocations."
     342    RTCString strConnection;     ///< "All Ethernet adapters that specify the same abstract network connection name within an OVF
     343                                 /// package shall be deployed on the same network. The abstract network connection name shall be
     344                                 /// listed in the NetworkSection at the outermost envelope level." We ignore this and only set up
     345                                 /// a network adapter depending on the network name.
     346    RTCString strAddress;        ///< "Device-specific. For an Ethernet adapter, this specifies the MAC address."
     347    int32_t lAddress;            ///< strAddress as an integer, if applicable.
     348    RTCString strAddressOnParent;///< "For a device, this specifies its location on the controller."
     349    RTCString strAllocationUnits;///< "Specifies the units of allocation used. For example, “byte * 2^20”."
     350    uint64_t ullVirtualQuantity; ///< "Specifies the quantity of resources presented. For example, “256”."
     351    uint64_t ullReservation;     ///< "Specifies the minimum quantity of resources guaranteed to be available."
     352    uint64_t ullLimit;           ///< "Specifies the maximum quantity of resources that will be granted."
     353    uint64_t ullWeight;          ///< "Specifies a relative priority for this allocation in relation to other allocations."
    354354
    355355    RTCString strConsumerVisibility;
    356356    RTCString strMappingBehavior;
    357357    RTCString strPoolID;
    358     uint32_t ulBusNumber;               // seen with IDE controllers, but not listed in OVF spec
    359 
    360     uint32_t ulLineNumber;              // line number of <Item> element in XML source; cached for error messages
     358    uint32_t ulBusNumber;        ///< seen with IDE controllers, but not listed in OVF spec
     359
     360    int m_iLineNumber;           ///< line number of \<Item\> element in XML source; cached for error messages
    361361
    362362    VirtualHardwareItem()
    363         : ulInstanceID(0),
    364           fResourceRequired(false),
    365           fAutomaticAllocation(false),
    366           fAutomaticDeallocation(false),
    367           ullVirtualQuantity(0),
    368           ullReservation(0),
    369           ullLimit(0),
    370           ullWeight(0),
    371           ulBusNumber(0),
    372           ulLineNumber(0),
    373           fDefault(false)
     363        : ulInstanceID(0)
     364        , fResourceRequired(false)
     365        , fAutomaticAllocation(false)
     366        , fAutomaticDeallocation(false)
     367        , ullVirtualQuantity(0)
     368        , ullReservation(0)
     369        , ullLimit(0)
     370        , ullWeight(0)
     371        , ulBusNumber(0)
     372        , m_iLineNumber(0)
     373        , fDefault(false)
    374374    {
    375375        itemName = "Item";
    376     };
     376    }
    377377
    378378    virtual ~VirtualHardwareItem() { /* Makes MSC happy. */ }
     
    417417    StorageAccessType_T accessType;
    418418    RTCString strHostExtentName;
     419#if 0 /* unused */
    419420    int16_t hostExtentNameFormat;
    420421    int16_t hostExtentNameNamespace;
    421422    int64_t hostExtentStartingAddress;
     423#endif
    422424    int64_t hostResourceBlockSize;
    423425    int64_t limit;
     
    430432
    431433public:
    432     StorageItem(): VirtualHardwareItem(),
    433         accessType(StorageAccessType_Unknown),
    434         hostExtentNameFormat(-1),
    435         hostExtentNameNamespace(-1),
    436         hostExtentStartingAddress(-1),
    437         hostResourceBlockSize(-1),
    438         limit(-1),
    439         reservation(-1),
    440         virtualQuantity(-1),
    441         virtualResourceBlockSize(-1)
     434    StorageItem()
     435        : VirtualHardwareItem()
     436        , accessType(StorageAccessType_Unknown)
     437#if 0 /* unused */
     438        , hostExtentNameFormat(-1)
     439        , hostExtentNameNamespace(-1)
     440        , hostExtentStartingAddress(-1)
     441#endif
     442        , hostResourceBlockSize(-1)
     443        , limit(-1)
     444        , reservation(-1)
     445        , virtualQuantity(-1)
     446        , virtualResourceBlockSize(-1)
    442447    {
    443448        itemName = "StorageItem";
     
    461466{
    462467    //see DMTF Schema Documentation http://schemas.dmtf.org/wbem/cim-html/2/
     468#if 0 /* unused */
    463469    uint16_t DefaultPortVID;
    464470    uint16_t DefaultPriority;
     
    466472    uint32_t GroupID;
    467473    uint32_t ManagerID;
     474    uint16_t NetworkPortProfileIDType;
     475#endif
    468476    RTCString strNetworkPortProfileID;
    469     uint16_t NetworkPortProfileIDType;
    470477    RTCString strOtherEndpointMode;
    471478    RTCString strOtherNetworkPortProfileIDTypeInfo;
    472479    RTCString strPortCorrelationID;
     480#if 0 /* unused */
    473481    uint16_t PortVID;
    474482    bool Promiscuous;
     
    479487    uint8_t VSITypeIDVersion;
    480488    uint16_t AllowedPriorities[256];
     489    uint16_t AllowedToReceiveVLANs[256];
     490    uint16_t AllowedToTransmitVLANs[256];
     491#endif
    481492    RTCString strAllowedToReceiveMACAddresses;
    482     uint16_t AllowedToReceiveVLANs[256];
    483493    RTCString strAllowedToTransmitMACAddresses;
    484     uint16_t AllowedToTransmitVLANs[256];
    485494
    486495public:
    487     EthernetPortItem(): VirtualHardwareItem()
     496    EthernetPortItem() : VirtualHardwareItem()
    488497    {
    489498        itemName = "EthernetPortItem";
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