static errcode_t parse_mmp_clear(struct field_set_info *info, char *field,
char *arg);
+#if __GNUC_PREREQ (4, 6) || defined(__clang__)
#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
/*
* Note: info->size == 6 is special; this means a base size 4 bytes,
- * and secondiory (high) size of 2 bytes. This is needed for the
+ * and secondary (high) size of 2 bytes. This is needed for the
* special case of i_blocks_high and i_file_acl_high.
*/
static errcode_t parse_uint(struct field_set_info *info, char *field,
}
if (!field2)
return 0;
- n = num >> (size*8);
+ n = (size == 8) ? 0 : (num >> (size*8));
u.ptr8 = (__u8 *) field2;
if (info->size == 6)
size = 2;
void do_set_block_group_descriptor(int argc, char *argv[])
{
const char *usage = "<bg number> <field> <value>\n"
- "\t\"set_block_group_descriptor -l\" will list the names of "
+ "\t\"set_block_group -l\" will list the names of "
"the fields in a block group descriptor\n\twhich can be set.";
struct field_set_info *table;
struct field_set_info *ss;
return;
}
- if (common_args_process(argc, argv, 4, 4, "set_block_group_descriptor",
+ if (common_args_process(argc, argv, 4, 4, "set_block_group",
usage, CHECK_FS_RW))
return;