Changeset 84509 in vbox
- Timestamp:
- May 25, 2020 3:09:24 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138238
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestLibSharedFoldersInline.h
r82968 r84509 970 970 VMMDevHGCMCall Call; 971 971 VBoxSFParmRead Parms; 972 RT_FLEXIBLE_ARRAY_EXTENSION 972 973 uint8_t abData[RT_FLEXIBLE_ARRAY]; 973 974 } VBOXSFREADEMBEDDEDREQ; … … 1117 1118 VMMDevHGCMCall Call; 1118 1119 VBoxSFParmWrite Parms; 1120 RT_FLEXIBLE_ARRAY_EXTENSION 1119 1121 uint8_t abData[RT_FLEXIBLE_ARRAY]; 1120 1122 } VBOXSFWRITEEMBEDDEDREQ; -
trunk/include/VBox/vmm/pdmpcidev.h
r82968 r84509 244 244 uint8_t abConfig[4096]; 245 245 /** The MSI-X state data. Optional. */ 246 RT_FLEXIBLE_ARRAY_EXTENSION 246 247 uint8_t abMsixState[RT_FLEXIBLE_ARRAY]; 247 248 } PDMPCIDEV; -
trunk/include/iprt/cdefs.h
r83813 r84509 2544 2544 * with a flexible size. 2545 2545 * 2546 * @note RT_FLEXIBLE_ARRAY_EXTENSION must always preceed the type, unless 2547 * it's C-only code. 2548 * 2546 2549 * @note Use RT_UOFFSETOF() to calculate the structure size. 2547 2550 * … … 2559 2562 */ 2560 2563 #if RT_MSC_PREREQ(RT_MSC_VER_VS2005) /** @todo Probably much much earlier. */ \ 2561 || (defined(__cplusplus) && RT_GNUC_PREREQ(6, 1) && !RT_GNUC_PREREQ(7, 0)) /* gcc-7 warns again */\ 2564 || (defined(__cplusplus) && ( RT_GNUC_PREREQ(6, 1) \ 2565 && ( !RT_GNUC_PREREQ(7, 0) /* gcc-7 warns again */ \ 2566 || RT_GNUC_PREREQ(10, 0) /* gcc-10 works with __extension__, the ones in between needs testing */ ))) \ 2562 2567 || defined(__WATCOMC__) /* openwatcom 1.9 supports it, we don't care about older atm. */ \ 2563 2568 || RT_CLANG_PREREQ_EX(3, 4, 0) /* Only tested clang v3.4, support is probably older. */ … … 2574 2579 #else 2575 2580 # define RT_FLEXIBLE_ARRAY 1 2581 #endif 2582 2583 /** @def RT_FLEXIBLE_ARRAY_EXTENSION 2584 * A trick to make GNU C++ quietly accept flexible arrays in C++ code when 2585 * pedantic warnings are enabled. Put this on the line before the flexible 2586 * array. */ 2587 #if (RT_GNUC_PREREQ(10, 0) && defined(__cplusplus)) || defined(DOXGYEN_RUNNING) 2588 # define RT_FLEXIBLE_ARRAY_EXTENSION RT_GCC_EXTENSION 2589 #else 2590 # define RT_FLEXIBLE_ARRAY_EXTENSION 2576 2591 #endif 2577 2592 -
trunk/include/iprt/crypto/applecodesign.h
r82968 r84509 148 148 uint32_t cSlots; 149 149 /** Slots. */ 150 RT_FLEXIBLE_ARRAY_EXTENSION 150 151 RTCRAPLCSBLOBSLOT aSlots[RT_FLEXIBLE_ARRAY]; 151 152 } RTCRAPLCSSUPERBLOB; -
trunk/include/iprt/crypto/pem.h
r84230 r84509 90 90 size_t cchName; 91 91 /** The field name. */ 92 RT_FLEXIBLE_ARRAY_EXTENSION 92 93 char szName[RT_FLEXIBLE_ARRAY]; 93 94 } RTCRPEMFIELD; -
trunk/include/iprt/formats/iso9660.h
r82968 r84509 239 239 uint16_t idParentRec; 240 240 /** 0x08: Directory identifier (d-characters or d1-characters). */ 241 RT_FLEXIBLE_ARRAY_EXTENSION 241 242 char achDirId[RT_FLEXIBLE_ARRAY]; 242 243 /* There will be a zero padding byte following if the directory identifier length is odd. */ … … 291 292 ISO9660U16 cbAppUse; 292 293 /** 0x0fa: Variable sized application use field. */ 294 RT_FLEXIBLE_ARRAY_EXTENSION 293 295 uint8_t abAppUse[RT_FLEXIBLE_ARRAY]; 294 296 /* This is followed by escape sequences with length given by cbEscapeSequnces. */ -
trunk/include/iprt/formats/mach-o.h
r82968 r84509 632 632 uint32_t sdk; /**< SDK version: 31..16=major, 15..8=minor, 7..0=patch */ 633 633 uint32_t ntools; /**< Number of build_tool_version entries following in aTools. */ 634 RT_FLEXIBLE_ARRAY_EXTENSION 634 635 build_tool_version_t aTools[RT_FLEXIBLE_ARRAY]; 635 636 } build_version_command_t; -
trunk/include/iprt/formats/ntfs.h
r82968 r84509 381 381 uint16_t idAttrib; 382 382 /** 0x1a: Maybe where the attribute name starts. */ 383 RT_FLEXIBLE_ARRAY_EXTENSION 383 384 RTUTF16 wszName[RT_FLEXIBLE_ARRAY]; 384 385 } NTFSATLISTENTRY; … … 499 500 uint8_t fFilenameType; 500 501 /** 0x42: The filename. */ 502 RT_FLEXIBLE_ARRAY_EXTENSION 501 503 RTUTF16 wszFilename[RT_FLEXIBLE_ARRAY]; 502 504 } NTFSATFILENAME; -
trunk/include/iprt/formats/pecoff.h
r84361 r84509 721 721 RT_GCC_EXTENSION uint8_t FrameOffset : 4; 722 722 /** Unwind opcodes. */ 723 IMAGE_UNWIND_CODE aOpcodes[RT_FLEXIBLE_ARRAY]; 723 RT_FLEXIBLE_ARRAY_EXTENSION 724 IMAGE_UNWIND_CODE aOpcodes[RT_FLEXIBLE_ARRAY]; 724 725 } IMAGE_UNWIND_INFO; 725 726 AssertCompileMemberOffset(IMAGE_UNWIND_INFO, aOpcodes, 4); -
trunk/include/iprt/formats/udf.h
r82968 r84509 792 792 /** 0x1b8: Partition maps (length given by @a cbMapTable), data format is 793 793 * defined by UDFPARTMAPHDR, UDFPARTMAPTYPE1 and UDFPARTMAPTYPE2. */ 794 RT_FLEXIBLE_ARRAY_EXTENSION 794 795 uint8_t abPartitionMaps[RT_FLEXIBLE_ARRAY]; 795 796 } UDFLOGICALVOLUMEDESC; … … 925 926 uint32_t cAllocationDescriptors; 926 927 /** 0x18: Allocation descriptors (variable length). */ 928 RT_FLEXIBLE_ARRAY_EXTENSION 927 929 UDFEXTENTAD aAllocationDescriptors[RT_FLEXIBLE_ARRAY]; 928 930 } UDFUNALLOCATEDSPACEDESC; … … 975 977 * the implementation to use. 976 978 */ 979 RT_FLEXIBLE_ARRAY_EXTENSION 977 980 uint32_t aTables[RT_FLEXIBLE_ARRAY]; 978 981 } UDFLOGICALVOLINTEGRITYDESC; … … 1075 1078 * After that is a d-string field with the name of the file, length 1076 1079 * specified by @a cbName. */ 1080 RT_FLEXIBLE_ARRAY_EXTENSION 1077 1081 uint8_t abImplementationUse[RT_FLEXIBLE_ARRAY]; 1078 1082 } UDFFILEIDDESC; … … 1358 1362 /** 0xb0: Two variable sized fields. First @a cbExtAttribs bytes of extended 1359 1363 * attributes, then @a cbAllocDescs bytes of allocation descriptors. */ 1364 RT_FLEXIBLE_ARRAY_EXTENSION 1360 1365 uint8_t abExtAttribs[RT_FLEXIBLE_ARRAY]; 1361 1366 } UDFFILEENTRY; … … 1971 1976 uint32_t cbBitmap; 1972 1977 /** 0x18: The bitmap. */ 1978 RT_FLEXIBLE_ARRAY_EXTENSION 1973 1979 uint8_t abBitmap[RT_FLEXIBLE_ARRAY]; 1974 1980 } UDFSPACEBITMAPDESC; … … 2000 2006 UDFENTITYID idImplementation; 2001 2007 /** 0x100: Implementation use data. */ 2008 RT_FLEXIBLE_ARRAY_EXTENSION 2002 2009 uint8_t abImplementationUse[RT_FLEXIBLE_ARRAY]; 2003 2010 } UDFPARTITIONINTEGRITYDESC; … … 2067 2074 /** 0xd8: Two variable sized fields. First @a cbExtAttribs bytes of extended 2068 2075 * attributes, then @a cbAllocDescs bytes of allocation descriptors. */ 2076 RT_FLEXIBLE_ARRAY_EXTENSION 2069 2077 uint8_t abExtAttribs[RT_FLEXIBLE_ARRAY]; 2070 2078 } UDFEXFILEENTRY; -
trunk/include/iprt/nt/hyperv.h
r82968 r84509 36 36 #else 37 37 # define RT_FLEXIBLE_ARRAY 38 # define RT_FLEXIBLE_ARRAY_EXTENSION 38 39 # define AssertCompile(expr) 39 40 # define AssertCompileSize(type, size) … … 498 499 uint32_t u32ExplicitPadding; 499 500 /* The repeating part: */ 501 RT_FLEXIBLE_ARRAY_EXTENSION 500 502 HV_SPA_PAGE_NUMBER PageList[RT_FLEXIBLE_ARRAY]; 501 503 } HV_INPUT_MAP_GPA_PAGES; … … 521 523 uint32_t u32ExplicitPadding; 522 524 /* The repeating part: */ 525 RT_FLEXIBLE_ARRAY_EXTENSION 523 526 HV_GPA_MAPPING PageList[RT_FLEXIBLE_ARRAY]; 524 527 } HV_INPUT_MAP_SPARSE_GPA_PAGES; … … 1234 1237 uint32_t fFlags; 1235 1238 /* The repeating part: */ 1239 RT_FLEXIBLE_ARRAY_EXTENSION 1236 1240 HV_REGISTER_NAME Names[RT_FLEXIBLE_ARRAY]; 1237 1241 } HV_INPUT_GET_VP_REGISTERS; … … 1268 1272 uint32_t RsvdZ; 1269 1273 /* The repeating part: */ 1274 RT_FLEXIBLE_ARRAY_EXTENSION 1270 1275 HV_REGISTER_ASSOC Elements[RT_FLEXIBLE_ARRAY]; 1271 1276 } HV_INPUT_SET_VP_REGISTERS; -
trunk/include/iprt/path.h
r82968 r84509 741 741 * of the last component. If RTPATH_PROP_DIR_SLASH is set, there may 742 742 * be one or more trailing slashes that are unaccounted for! */ 743 RT_FLEXIBLE_ARRAY_EXTENSION 743 744 struct 744 745 { … … 833 834 const char *pszSuffix; 834 835 /** Array of component strings (variable size). */ 836 RT_FLEXIBLE_ARRAY_EXTENSION 835 837 char *apszComps[RT_FLEXIBLE_ARRAY]; 836 838 } RTPATHSPLIT; -
trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFInternal.h
r79112 r84509 87 87 uint8_t cchName; 88 88 /** The shared folder name. If there is a tag it follows as a second string. */ 89 RT_FLEXIBLE_ARRAY_EXTENSION 89 90 char szName[RT_FLEXIBLE_ARRAY]; 90 91 } VBOXSFFOLDER; -
trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp
r84468 r84509 96 96 uint16_t fFlags; /**< flags avail ring guest-to-host flags */ 97 97 uint16_t uIdx; /**< idx Index of next free ring slot */ 98 RT_FLEXIBLE_ARRAY_EXTENSION 98 99 uint16_t auRing[RT_FLEXIBLE_ARRAY]; /**< ring Ring: avail drv to dev bufs */ 99 100 /* uint16_t uUsedEventIdx; - used_event (if VIRTQ_USED_F_EVENT_IDX) */ … … 110 111 uint16_t fFlags; /**< flags used ring host-to-guest flags */ 111 112 uint16_t uIdx; /**< idx Index of next ring slot */ 113 RT_FLEXIBLE_ARRAY_EXTENSION 112 114 VIRTQ_USED_ELEM_T aRing[RT_FLEXIBLE_ARRAY]; /**< ring Ring: used dev to drv bufs */ 113 115 /* uint16_t uAvailEventIdx; - avail_event if (VIRTQ_USED_F_EVENT_IDX) */ -
trunk/src/VBox/Devices/testcase/tstDeviceInternal.h
r83296 r84509 131 131 size_t cbAlloc; 132 132 /** Start of the real allocation. */ 133 RT_FLEXIBLE_ARRAY_EXTENSION 133 134 uint8_t abAlloc[RT_FLEXIBLE_ARRAY]; 134 135 } TSTDEVMMHEAPALLOC; -
trunk/src/VBox/HostServices/GuestControl/VBoxGuestControlSvc.cpp
r83506 r84509 843 843 uint32_t cbKey; 844 844 /** The key bytes. */ 845 RT_FLEXIBLE_ARRAY_EXTENSION 845 846 uint8_t abKey[RT_FLEXIBLE_ARRAY]; 846 847 } GstCtrlPreparedSession; -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r84142 r84509 57 57 uint32_t cParms; 58 58 /** HGCM parameters. */ 59 RT_FLEXIBLE_ARRAY_EXTENSION 59 60 VBOXHGCMSVCPARM aParms[RT_FLEXIBLE_ARRAY]; 60 61 } SHCLCLIENTMSG; -
trunk/src/VBox/Runtime/common/checksum/manifest2.cpp
r82968 r84509 65 65 bool fVisited; 66 66 /** The normalized property name that StrCore::pszString points at. */ 67 RT_FLEXIBLE_ARRAY_EXTENSION 67 68 char szName[RT_FLEXIBLE_ARRAY]; 68 69 } RTMANIFESTATTR; -
trunk/src/VBox/Runtime/common/dbg/dbgmodmapsym.cpp
r82968 r84509 67 67 uint8_t cchMaxSym; /**< 0x0e: Maximum symbol-name length. */ 68 68 uint8_t cchModule; /**< 0x0f: Length of the module name. */ 69 RT_FLEXIBLE_ARRAY_EXTENSION 69 70 char achModule[RT_FLEXIBLE_ARRAY]; /**< 0x10: Module name, length given by cchModule. */ 70 71 } MAPSYMHDR; … … 92 93 uint16_t u16Reserved2; /**< 0x12: Reserved / unknown. Often seen holding 0xff00. */ 93 94 uint8_t cchSegName; /**< 0x14: Segment name length. */ 95 RT_FLEXIBLE_ARRAY_EXTENSION 94 96 char achSegName[RT_FLEXIBLE_ARRAY]; /**< 0x15: Segment name, length given by cchSegName. */ 95 97 } MAPSYMSEGDEF; … … 122 124 uint16_t cLines; /**< 0x08: Number of line numbers in the array. */ 123 125 uint8_t cchSrcFile; /**< 0x0a: Length of source filename. */ 126 RT_FLEXIBLE_ARRAY_EXTENSION 124 127 char achSrcFile[RT_FLEXIBLE_ARRAY]; /**< 0x0b: Source filename, length given by cchSrcFile. */ 125 128 } MAPSYMLINEDEF; -
trunk/src/VBox/Runtime/common/fs/RTFsCmdLs.cpp
r82968 r84509 64 64 size_t cchName; 65 65 /** The entry name. */ 66 RT_FLEXIBLE_ARRAY_EXTENSION 66 67 char szName[RT_FLEXIBLE_ARRAY]; 67 68 } RTCMDLSENTRY; … … 90 91 91 92 /** The collection name (path). */ 93 RT_FLEXIBLE_ARRAY_EXTENSION 92 94 char szName[RT_FLEXIBLE_ARRAY]; 93 95 } RTCMDLSCOLLECTION; -
trunk/src/VBox/Runtime/common/fs/fatvfs.cpp
r82968 r84509 320 320 const char *pszName; 321 321 /** Cache entries. */ 322 RT_FLEXIBLE_ARRAY_EXTENSION 322 323 RTFSFATCLUSTERMAPENTRY aEntries[RT_FLEXIBLE_ARRAY]; 323 324 } RTFSFATCLUSTERMAPCACHE; -
trunk/src/VBox/Runtime/common/fs/isomaker.cpp
r82968 r84509 258 258 uint16_t cchName; 259 259 /** The name. */ 260 RT_FLEXIBLE_ARRAY_EXTENSION 260 261 char szName[RT_FLEXIBLE_ARRAY]; 261 262 } RTFSISOMAKERNAME; … … 448 449 uint16_t cchTarget; 449 450 /** The symbolic link target. */ 451 RT_FLEXIBLE_ARRAY_EXTENSION 450 452 char szTarget[RT_FLEXIBLE_ARRAY]; 451 453 } RTFSISOMAKERSYMLINK; -
trunk/src/VBox/Runtime/common/ldr/ldrLX.cpp
r82968 r84509 157 157 uint32_t cSegments; 158 158 /** Segment info. */ 159 RT_FLEXIBLE_ARRAY_EXTENSION 159 160 RTLDRSEG aSegments[RT_FLEXIBLE_ARRAY]; 160 161 } KLDRMODLX, *PKLDRMODLX; -
trunk/src/VBox/Runtime/common/vfs/vfsfss2dir.cpp
r84192 r84509 65 65 /** The name (relative to RTVFSFSSWRITE2DIR::szBaseDir). */ 66 66 #endif 67 RT_FLEXIBLE_ARRAY_EXTENSION 67 68 char szName[RT_FLEXIBLE_ARRAY]; 68 69 } RTVFSFSSWRITE2DIRENTRY; … … 87 88 #else 88 89 /** Path to the directory that all operations are relative to. */ 90 RT_FLEXIBLE_ARRAY_EXTENSION 89 91 char szBaseDir[RT_FLEXIBLE_ARRAY]; 90 92 #endif -
trunk/src/VBox/Runtime/common/vfs/vfsstddir.cpp
r82968 r84509 75 75 PRTVFSSTDDIR pDir; 76 76 /** The symbolic link name. */ 77 RT_FLEXIBLE_ARRAY_EXTENSION 77 78 char szSymlink[RT_FLEXIBLE_ARRAY]; 78 79 } RTVFSSTDSYMLINK; -
trunk/src/VBox/Runtime/generic/ftp-server.cpp
r82842 r84509 105 105 size_t cchName; 106 106 /** The entry name. */ 107 RT_FLEXIBLE_ARRAY_EXTENSION 107 108 char szName[RT_FLEXIBLE_ARRAY]; 108 109 } RTFTPDIRENTRY; -
trunk/src/VBox/Runtime/generic/http-curl.cpp
r83356 r84509 128 128 uint32_t offValue; 129 129 /** The full header field. */ 130 char szData[RT_FLEXIBLE_ARRAY]; 130 RT_FLEXIBLE_ARRAY_EXTENSION 131 RT_GCC_EXTENSION char szData[RT_FLEXIBLE_ARRAY]; 131 132 } RTHTTPHEADER; 132 133 /** Pointer to a HTTP header. */ -
trunk/src/VBox/Runtime/tools/RTLdrCheckImports.cpp
r82968 r84509 103 103 uint32_t cImports; 104 104 /** Import modules. */ 105 RT_FLEXIBLE_ARRAY_EXTENSION 105 106 RTCHECKIMPORTMODULE aImports[RT_FLEXIBLE_ARRAY]; 106 107 } RTCHECKIMPORTSTATE; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3ObjConverter.cpp
r83773 r84509 3807 3807 struct OMFDETAILSALLOC *pNext; 3808 3808 /** The allocated bytes. */ 3809 RT_FLEXIBLE_ARRAY_EXTENSION 3809 3810 uint8_t abData[RT_FLEXIBLE_ARRAY]; 3810 3811 } OMFDETAILSALLOC; -
trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp
r83986 r84509 268 268 RTLISTNODE Entry; 269 269 uint16_t cchName; 270 RT_FLEXIBLE_ARRAY_EXTENSION 270 271 char szName[RT_FLEXIBLE_ARRAY]; 271 272 } FSPERFNAMEENTRY;
Note:
See TracChangeset
for help on using the changeset viewer.