configure: re-enable '-Wmissing-field-initializers'
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 9 Mar 2022 22:14:20 +0000 (17:14 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 Nov 2023 04:27:37 +0000 (00:27 -0400)
This warning is part of '-Wextra' in GCC.

Change-Id: Ie6170cb06900e93011ddedc102a9964c63edad55
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7558
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
configure.ac
src/bindings/python/bt2/Makefile.am
src/plugins/ctf/common/metadata/Makefile.am
src/plugins/ctf/common/metadata/ctf-meta-translate.cpp
src/plugins/ctf/lttng-live/lttng-live.cpp
src/plugins/ctf/lttng-live/viewer-connection.cpp

index 716c9f4da5fd3154a1bf518b9597a7ee1c9a8ef8..90ce3d2077f62a6f9801548512f660f5fb0e89a0 100644 (file)
@@ -761,7 +761,6 @@ m4_define([WARN_FLAGS_LIST], [ dnl
   dnl
   dnl Ref: https://github.com/swig/swig/issues/1259
   -Wno-cast-function-type dnl
-  -Wno-missing-field-initializers dnl
   -Wno-maybe-uninitialized dnl
 ])
 
index e427ef61e892997740b4b5e7f87aea3c972286d5..4be841442aa4134eea3979c21367e796ea09f5bd 100644 (file)
@@ -122,6 +122,9 @@ WARN_CFLAGS += -Wno-deprecated-declarations
 # Python 3.11 + gcc 12.2.0 gave warnings of this kind in Python.h.
 WARN_CFLAGS += -Wno-redundant-decls
 
+# For SWIG generated code
+WARN_CFLAGS += -Wno-missing-field-initializers
+
 BUILD_FLAGS=CC="$(CC)" \
                CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(WARN_CFLAGS)" \
                CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS) -I$(srcdir)/bt2" \
index 7d843d64653ab09f22e8fd1bad058fc1f0d3e891..2fca29b39a1638c2dd22bc116534a6669403b270 100644 (file)
@@ -17,7 +17,8 @@ libctf_parser_la_CPPFLAGS = $(AM_CPPFLAGS) \
 # produces.
 libctf_parser_la_CXXFLAGS = $(AM_CXXFLAGS) \
        -Wno-unused-function \
-       -Wno-null-dereference
+       -Wno-null-dereference \
+       -Wno-missing-field-initializers
 
 libctf_ast_la_SOURCES = \
        visitor-generate-ir.cpp \
index 6f066b772b01cb395aa1e79e59b5b85009d58d0e..09707108b6fca664f8119334b95bdb1353999af9 100644 (file)
@@ -623,7 +623,7 @@ int ctf_trace_class_translate(bt_self_component *self_comp, bt_trace_class *ir_t
 {
     int ret = 0;
     uint64_t i;
-    struct ctx ctx = {0};
+    struct ctx ctx = {};
 
     ctx.self_comp = self_comp;
     ctx.tc = tc;
index be6d7ba97adfacb0907c3493db9943e8d56c582a..5ff0ff3fdb86d1cae380fff696159179b6539656 100644 (file)
@@ -1958,7 +1958,7 @@ lttng_live_query_support_info(const bt_value *params, const bt_value **result,
     const bt_value *input_type_value;
     const bt_value *input_value;
     double weight = 0;
-    struct bt_common_lttng_live_url_parts parts = {0};
+    struct bt_common_lttng_live_url_parts parts = {};
 
     /* Used by the logging macros */
     __attribute__((unused)) bt_self_component *self_comp = NULL;
index 8706493bc1240f184673c1f8ac3c985e6010d545..1236ba415f6502e7d8a0583c61a877c5b9c9e1b9 100644 (file)
@@ -336,7 +336,7 @@ static int parse_url(struct live_viewer_connection *viewer_connection)
     char error_buf[256] = {0};
     bt_self_component *self_comp = viewer_connection->self_comp;
     bt_self_component_class *self_comp_class = viewer_connection->self_comp_class;
-    struct bt_common_lttng_live_url_parts lttng_live_url_parts = {0};
+    struct bt_common_lttng_live_url_parts lttng_live_url_parts = {};
     int ret = -1;
     const char *path = viewer_connection->url->str;
 
This page took 0.028707 seconds and 4 git commands to generate.