Whamcloud - gitweb
Suppress annoying missing field initializer warnings
authorTheodore Ts'o <tytso@mit.edu>
Mon, 13 Jul 2015 00:44:53 +0000 (20:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Jul 2015 01:39:37 +0000 (21:39 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/set_fields.c
e2fsck/problem.c
misc/e4crypt.c

index 365a8dc..45fc750 100644 (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)
 {
index 4f4309e..23d2183 100644 (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)
 {
index c186eb8..2600d95 100644 (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)