Skip to content

Commit 79f8e62

Browse files
youzhongyangtonyhutter
authored andcommitted
Silence clang warning of flexible array not at end
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Youzhong Yang <[email protected]> Closes openzfs#14764
1 parent 5f125e9 commit 79f8e62

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/sys/dmu_objset.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ struct dmu_tx;
7272
*/
7373
#define OBJSET_CRYPT_PORTABLE_FLAGS_MASK (0)
7474

75+
#if defined(__clang__)
76+
#pragma clang diagnostic push
77+
#pragma clang diagnostic ignored "-Wgnu-variable-sized-type-not-at-end"
78+
#endif
7579
typedef struct objset_phys {
7680
dnode_phys_t os_meta_dnode;
7781
zil_header_t os_zil_header;
@@ -88,6 +92,9 @@ typedef struct objset_phys {
8892
char os_pad1[OBJSET_PHYS_SIZE_V3 - OBJSET_PHYS_SIZE_V2 -
8993
sizeof (dnode_phys_t)];
9094
} objset_phys_t;
95+
#if defined(__clang__)
96+
#pragma clang diagnostic pop
97+
#endif
9198

9299
typedef int (*dmu_objset_upgrade_cb_t)(objset_t *);
93100

0 commit comments

Comments
 (0)