From 30cbeda0ae0580968c3888d6c75e2fc645929b57 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 15 May 2019 14:31:02 +0100 Subject: [PATCH 1/2] libmalcontent: Add missing field initialisers to BUILDER_INIT This fixes use of libmalcontent in projects which build with `-Wmissing-field-initializers`. Signed-off-by: Philip Withnall --- libmalcontent/app-filter.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmalcontent/app-filter.h b/libmalcontent/app-filter.h index c77f62a..5b7573b 100644 --- a/libmalcontent/app-filter.h +++ b/libmalcontent/app-filter.h @@ -159,6 +159,9 @@ GType mct_app_filter_builder_get_type (void); g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL), \ TRUE, \ FALSE, \ + /* padding: */ \ + NULL, \ + NULL \ } void mct_app_filter_builder_init (MctAppFilterBuilder *builder); From 432ba58f74641a0997315483625ca6bca53b511c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 15 May 2019 14:31:44 +0100 Subject: [PATCH 2/2] build: Enable -Wmissing-field-initializers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So we don’t regress on the previous commit in future. Signed-off-by: Philip Withnall --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5cde60d..0506c13 100644 --- a/meson.build +++ b/meson.build @@ -82,7 +82,7 @@ test_c_args = [ '-Wmissing-prototypes', '-Wnested-externs', '-Wno-error=cpp', - '-Wno-missing-field-initializers', + '-Wmissing-field-initializers', '-Wno-suggest-attribute=format', '-Wno-unused-parameter', '-Wnull-dereference',