From 12aa7ad54eeafc32a1a284f13e926dfd16c6bb73 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 12 Jul 2015 20:44:53 -0400 Subject: [PATCH] Suppress annoying missing field initializer warnings Signed-off-by: Theodore Ts'o --- debugfs/set_fields.c | 5 +++++ e2fsck/problem.c | 4 ++++ misc/e4crypt.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c index 365a8dca..45fc7506 100644 --- a/debugfs/set_fields.c +++ b/debugfs/set_fields.c @@ -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) { diff --git a/e2fsck/problem.c b/e2fsck/problem.c index 4f4309ee..23d21835 100644 --- a/e2fsck/problem.c +++ b/e2fsck/problem.c @@ -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) { diff --git a/misc/e4crypt.c b/misc/e4crypt.c index c186eb83..2600d95a 100644 --- a/misc/e4crypt.c +++ b/misc/e4crypt.c @@ -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) -- 2.11.0