VirtualBox

Changeset 84509 in vbox for trunk/src


Ignore:
Timestamp:
May 25, 2020 3:09:24 PM (5 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h,*: Introducing RT_FLEXIBLE_ARRAY_EXTENSION as a g++ hack that allows us to use RT_FLEXIBLE_ARRAY without the compiler going all pendantic on us. Only tested with 10.1.0. bugref:9746

Location:
trunk/src/VBox
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFInternal.h

    r79112 r84509  
    8787    uint8_t             cchName;
    8888    /** The shared folder name.  If there is a tag it follows as a second string. */
     89    RT_FLEXIBLE_ARRAY_EXTENSION
    8990    char                szName[RT_FLEXIBLE_ARRAY];
    9091} VBOXSFFOLDER;
  • trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp

    r84468 r84509  
    9696    uint16_t  fFlags;                                            /**< flags      avail ring guest-to-host flags */
    9797    uint16_t  uIdx;                                              /**< idx        Index of next free ring slot   */
     98    RT_FLEXIBLE_ARRAY_EXTENSION
    9899    uint16_t  auRing[RT_FLEXIBLE_ARRAY];                         /**< ring       Ring: avail drv to dev bufs    */
    99100    /* uint16_t  uUsedEventIdx;                                     - used_event (if VIRTQ_USED_F_EVENT_IDX)    */
     
    110111    uint16_t  fFlags;                                            /**< flags       used ring host-to-guest flags */
    111112    uint16_t  uIdx;                                              /**< idx         Index of next ring slot       */
     113    RT_FLEXIBLE_ARRAY_EXTENSION
    112114    VIRTQ_USED_ELEM_T aRing[RT_FLEXIBLE_ARRAY];                  /**< ring        Ring: used dev to drv bufs    */
    113115    /* uint16_t  uAvailEventIdx;                                    - avail_event if (VIRTQ_USED_F_EVENT_IDX)   */
  • trunk/src/VBox/Devices/testcase/tstDeviceInternal.h

    r83296 r84509  
    131131    size_t                          cbAlloc;
    132132    /** Start of the real allocation. */
     133    RT_FLEXIBLE_ARRAY_EXTENSION
    133134    uint8_t                         abAlloc[RT_FLEXIBLE_ARRAY];
    134135} TSTDEVMMHEAPALLOC;
  • trunk/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.cpp

    r83506 r84509  
    843843    uint32_t    cbKey;
    844844    /** The key bytes. */
     845    RT_FLEXIBLE_ARRAY_EXTENSION
    845846    uint8_t     abKey[RT_FLEXIBLE_ARRAY];
    846847} GstCtrlPreparedSession;
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h

    r84142 r84509  
    5757    uint32_t            cParms;
    5858    /** HGCM parameters. */
     59    RT_FLEXIBLE_ARRAY_EXTENSION
    5960    VBOXHGCMSVCPARM     aParms[RT_FLEXIBLE_ARRAY];
    6061} SHCLCLIENTMSG;
  • trunk/src/VBox/Runtime/common/checksum/manifest2.cpp

    r82968 r84509  
    6565    bool                fVisited;
    6666    /** The normalized property name that StrCore::pszString points at. */
     67    RT_FLEXIBLE_ARRAY_EXTENSION
    6768    char                szName[RT_FLEXIBLE_ARRAY];
    6869} RTMANIFESTATTR;
  • trunk/src/VBox/Runtime/common/dbg/dbgmodmapsym.cpp

    r82968 r84509  
    6767    uint8_t     cchMaxSym;                      /**< 0x0e: Maximum symbol-name length. */
    6868    uint8_t     cchModule;                      /**< 0x0f: Length of the module name. */
     69    RT_FLEXIBLE_ARRAY_EXTENSION
    6970    char        achModule[RT_FLEXIBLE_ARRAY];   /**< 0x10: Module name, length given by cchModule. */
    7071} MAPSYMHDR;
     
    9293    uint16_t    u16Reserved2;                  /**< 0x12: Reserved / unknown.  Often seen holding 0xff00. */
    9394    uint8_t     cchSegName;                    /**< 0x14: Segment name length. */
     95    RT_FLEXIBLE_ARRAY_EXTENSION
    9496    char        achSegName[RT_FLEXIBLE_ARRAY]; /**< 0x15: Segment name, length given by cchSegName. */
    9597} MAPSYMSEGDEF;
     
    122124    uint16_t    cLines;                        /**< 0x08: Number of line numbers in the array. */
    123125    uint8_t     cchSrcFile;                    /**< 0x0a: Length of source filename. */
     126    RT_FLEXIBLE_ARRAY_EXTENSION
    124127    char        achSrcFile[RT_FLEXIBLE_ARRAY]; /**< 0x0b: Source filename, length given by cchSrcFile. */
    125128} MAPSYMLINEDEF;
  • trunk/src/VBox/Runtime/common/fs/RTFsCmdLs.cpp

    r82968 r84509  
    6464    size_t      cchName;
    6565    /** The entry name. */
     66    RT_FLEXIBLE_ARRAY_EXTENSION
    6667    char        szName[RT_FLEXIBLE_ARRAY];
    6768} RTCMDLSENTRY;
     
    9091
    9192    /** The collection name (path). */
     93    RT_FLEXIBLE_ARRAY_EXTENSION
    9294    char            szName[RT_FLEXIBLE_ARRAY];
    9395} RTCMDLSCOLLECTION;
  • trunk/src/VBox/Runtime/common/fs/fatvfs.cpp

    r82968 r84509  
    320320    const char             *pszName;
    321321    /** Cache entries. */
     322    RT_FLEXIBLE_ARRAY_EXTENSION
    322323    RTFSFATCLUSTERMAPENTRY  aEntries[RT_FLEXIBLE_ARRAY];
    323324} RTFSFATCLUSTERMAPCACHE;
  • trunk/src/VBox/Runtime/common/fs/isomaker.cpp

    r82968 r84509  
    258258    uint16_t                cchName;
    259259    /** The name. */
     260    RT_FLEXIBLE_ARRAY_EXTENSION
    260261    char                    szName[RT_FLEXIBLE_ARRAY];
    261262} RTFSISOMAKERNAME;
     
    448449    uint16_t                cchTarget;
    449450    /** The symbolic link target. */
     451    RT_FLEXIBLE_ARRAY_EXTENSION
    450452    char                    szTarget[RT_FLEXIBLE_ARRAY];
    451453} RTFSISOMAKERSYMLINK;
  • trunk/src/VBox/Runtime/common/ldr/ldrLX.cpp

    r82968 r84509  
    157157    uint32_t                cSegments;
    158158    /** Segment info. */
     159    RT_FLEXIBLE_ARRAY_EXTENSION
    159160    RTLDRSEG                aSegments[RT_FLEXIBLE_ARRAY];
    160161} KLDRMODLX, *PKLDRMODLX;
  • trunk/src/VBox/Runtime/common/vfs/vfsfss2dir.cpp

    r84192 r84509  
    6565    /** The name (relative to RTVFSFSSWRITE2DIR::szBaseDir). */
    6666#endif
     67    RT_FLEXIBLE_ARRAY_EXTENSION
    6768    char            szName[RT_FLEXIBLE_ARRAY];
    6869} RTVFSFSSWRITE2DIRENTRY;
     
    8788#else
    8889    /** Path to the directory that all operations are relative to. */
     90    RT_FLEXIBLE_ARRAY_EXTENSION
    8991    char            szBaseDir[RT_FLEXIBLE_ARRAY];
    9092#endif
  • trunk/src/VBox/Runtime/common/vfs/vfsstddir.cpp

    r82968 r84509  
    7575    PRTVFSSTDDIR    pDir;
    7676    /** The symbolic link name. */
     77    RT_FLEXIBLE_ARRAY_EXTENSION
    7778    char            szSymlink[RT_FLEXIBLE_ARRAY];
    7879} RTVFSSTDSYMLINK;
  • trunk/src/VBox/Runtime/generic/ftp-server.cpp

    r82842 r84509  
    105105    size_t      cchName;
    106106    /** The entry name. */
     107    RT_FLEXIBLE_ARRAY_EXTENSION
    107108    char        szName[RT_FLEXIBLE_ARRAY];
    108109} RTFTPDIRENTRY;
  • trunk/src/VBox/Runtime/generic/http-curl.cpp

    r83356 r84509  
    128128    uint32_t            offValue;
    129129    /** The full header field. */
    130     char                szData[RT_FLEXIBLE_ARRAY];
     130    RT_FLEXIBLE_ARRAY_EXTENSION
     131    RT_GCC_EXTENSION char szData[RT_FLEXIBLE_ARRAY];
    131132} RTHTTPHEADER;
    132133/** Pointer to a HTTP header. */
  • trunk/src/VBox/Runtime/tools/RTLdrCheckImports.cpp

    r82968 r84509  
    103103    uint32_t                cImports;
    104104    /** Import modules. */
     105    RT_FLEXIBLE_ARRAY_EXTENSION
    105106    RTCHECKIMPORTMODULE     aImports[RT_FLEXIBLE_ARRAY];
    106107} RTCHECKIMPORTSTATE;
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp

    r83773 r84509  
    38073807    struct OMFDETAILSALLOC *pNext;
    38083808    /** The allocated bytes. */
     3809    RT_FLEXIBLE_ARRAY_EXTENSION
    38093810    uint8_t                 abData[RT_FLEXIBLE_ARRAY];
    38103811} OMFDETAILSALLOC;
  • trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp

    r83986 r84509  
    268268    RTLISTNODE  Entry;
    269269    uint16_t    cchName;
     270    RT_FLEXIBLE_ARRAY_EXTENSION
    270271    char        szName[RT_FLEXIBLE_ARRAY];
    271272} FSPERFNAMEENTRY;
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