static errcode_t parse_mmp_clear(struct field_set_info *info, char *field,
char *arg);
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
static struct field_set_info super_fields[] = {
{ "inodes_count", &set_sb.s_inodes_count, NULL, 4, parse_uint },
{ "checksum", &set_mmp.mmp_checksum, NULL, 4, parse_uint },
{ 0, 0, 0, 0 }
};
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
+#endif
#ifdef UNITTEST
"", /* 20 */
};
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
static struct e2fsck_problem problem_table[] = {
{ PR_LATCH_OPTIMIZE_EXT, PR_1E_OPTIMIZE_EXT_HEADER, PR_1E_OPTIMIZE_EXT_END },
{ -1, 0, 0 },
};
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
+#endif
static struct e2fsck_problem *find_problem(problem_t code)
{
typedef struct {
__le32 a_version;
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
posix_acl_xattr_entry a_entries[0];
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
+#endif
} posix_acl_xattr_header;
__u32 fm_mapped_extents;/* number of extents that were mapped (out) */
__u32 fm_extent_count; /* size of fm_extents array (in) */
__u32 fm_reserved;
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
+#endif
};
#if defined(__linux__) && !defined(FS_IOC_FIEMAP)
struct ext2fs_hashmap_entry *next;
struct ext2fs_hashmap_entry *list_next;
struct ext2fs_hashmap_entry *list_prev;
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
} *entries[0];
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
+#endif
};
struct ext2fs_hashmap *ext2fs_hashmap_create(
#define O_DIRECT 0
#endif
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#ifndef CONFIG_MMP
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
+#endif
errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf)
{
return EXT2_ET_OP_NOT_SUPPORTED;
#endif
}
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
+#endif
}
/* parameters might not be used if OS doesn't support zeroout */
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
static errcode_t unix_zeroout(io_channel channel, unsigned long long block,
unsigned long long count)
{
unimplemented:
return EXT2_ET_UNIMPLEMENTED;
}
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
+#endif
static struct struct_io_manager struct_unix_manager = {
.magic = EXT2_ET_MAGIC_IO_MANAGER,
}
#endif /* defined(USE_UUIDD) && defined(HAVE_SYS_UN_H) */
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic push
#if !defined(USE_UUIDD) || !defined(HAVE_SYS_UN_H)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
+#endif
/*
* Try using the uuidd daemon to generate the UUID
*
#endif
return -1;
}
+#if __GNUC_PREREQ (4, 6)
#pragma GCC diagnostic pop
+#endif
void uuid__generate_time(uuid_t out, int *num)
{
__le32 magic; /* KEYBLOCK_MAGIC number */
__le32 crc; /* block checksum */
__le64 reserved; /* zero */
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
struct undo_key keys[0]; /* keys, which come immediately after */
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
+#endif
};
struct undo_key_info {
char *end;
blocksize = strtoul(optarg, &end, 0);
if (end) {
+#if __GNUC_PREREQ (7, 0)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
switch (end[0]) {
case 'g':
case 'G':
default:
break;
}
+#if __GNUC_PREREQ (7, 0)
#pragma GCC diagnostic pop
+#endif
}
} else { /* Allow -b without argument for compat. Remove
* this eventually so "-b {blocksize}" works */
typedef struct {
u_int32_t a_version;
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
acl_ea_entry a_entries[0];
+#if __GNUC_PREREQ (4, 8)
#pragma GCC diagnostic pop
+#endif
} acl_ea_header;
static inline size_t acl_ea_size(int count)