Suppress annoying missing field initializer warnings

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debian
Theodore Ts'o 2015-07-12 20:44:53 -04:00
parent 1dc16b0b95
commit 12aa7ad54e
3 changed files with 10 additions and 1 deletions

View File

@ -74,6 +74,9 @@ static errcode_t parse_gd_csum(struct field_set_info *info, char *field, char *a
static errcode_t parse_mmp_clear(struct field_set_info *info, char *field,
char *arg);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
static struct field_set_info super_fields[] = {
{ "inodes_count", &set_sb.s_inodes_count, NULL, 4, parse_uint },
{ "blocks_count", &set_sb.s_blocks_count, &set_sb.s_blocks_count_hi,
@ -278,9 +281,11 @@ static struct field_set_info mmp_fields[] = {
{ "checksum", &set_mmp.mmp_checksum, NULL, 4, parse_uint },
{ 0, 0, 0, 0 }
};
#pragma GCC diagnostic pop
#ifdef UNITTEST
static void do_verify_field_set_info(struct field_set_info *fields,
const void *data, size_t size)
{

View File

@ -99,6 +99,9 @@ static const char *preen_msg[] = {
"", /* 20 */
};
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
static struct e2fsck_problem problem_table[] = {
/* Pre-Pass 1 errors */
@ -2001,6 +2004,7 @@ static struct latch_descr pr_latch_info[] = {
{ PR_LATCH_OPTIMIZE_EXT, PR_1E_OPTIMIZE_EXT_HEADER, PR_1E_OPTIMIZE_EXT_END },
{ -1, 0, 0 },
};
#pragma GCC diagnostic pop
static struct e2fsck_problem *find_problem(problem_t code)
{

View File

@ -832,7 +832,7 @@ const struct cmd_desc cmd_list[] = {
CMD(get_policy),
CMD(new_session),
CMD(set_policy),
{ NULL, NULL, NULL, NULL }
{ NULL, NULL, NULL, NULL, 0 }
};
void do_help(int argc, char **argv, const struct cmd_desc *cmd)