ctf-writer: Fix -Wredundant-decls warning
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 28 Oct 2019 02:03:34 +0000 (22:03 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Oct 2019 19:14:53 +0000 (15:14 -0400)
I get this warning:

      CC       clock.lo
    In file included from /home/simark/src/babeltrace/src/ctf-writer/stream-class.h:42,
                     from /home/simark/src/babeltrace/src/ctf-writer/trace.h:44,
                     from /home/simark/src/babeltrace/src/ctf-writer/clock.h:32,
                     from /home/simark/src/babeltrace/src/ctf-writer/clock.c:41:
    /home/simark/src/babeltrace/src/ctf-writer/utils.h:40:13: error: redundant redeclaration of ‘bt_ctf_get_byte_order_string’ [-Werror=redundant-decls]
       40 | const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order);
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/simark/src/babeltrace/src/ctf-writer/field-types.h:42,
                     from /home/simark/src/babeltrace/src/ctf-writer/stream-class.h:39,
                     from /home/simark/src/babeltrace/src/ctf-writer/trace.h:44,
                     from /home/simark/src/babeltrace/src/ctf-writer/clock.h:32,
                     from /home/simark/src/babeltrace/src/ctf-writer/clock.c:41:
    /home/simark/src/babeltrace/src/ctf-writer/writer.h:67:13: note: previous declaration of ‘bt_ctf_get_byte_order_string’ was here
       67 | const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order);
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

The implementation is in writer.c and we have a declaration in writer.h.
The declaration in utils.h seems superfluous.

Change-Id: I03ffc4d869f8fa0372ac7f04b64b2199047ca4e1
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2273
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/ctf-writer/utils.h

index 683905806ecec3f278bb08f3ea039bbc20c3d3ee..1b961eb63bc2765d3fafbd005073321c164628b3 100644 (file)
@@ -36,9 +36,6 @@ struct bt_ctf_search_query {
        int found;
 };
 
-BT_HIDDEN
-const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order);
-
 static inline
 const char *bt_ctf_field_type_id_string(enum bt_ctf_field_type_id type_id)
 {
This page took 0.024925 seconds and 4 git commands to generate.