From: Simon Marchi Date: Mon, 28 Oct 2019 02:03:34 +0000 (-0400) Subject: ctf-writer: Fix -Wredundant-decls warning X-Git-Tag: v2.0.0-rc2~29 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=d79112475cf9bcfd5ed83736104705b943a14c1e ctf-writer: Fix -Wredundant-decls warning 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 Reviewed-on: https://review.lttng.org/c/babeltrace/+/2273 Reviewed-by: Francis Deslauriers --- diff --git a/src/ctf-writer/utils.h b/src/ctf-writer/utils.h index 68390580..1b961eb6 100644 --- a/src/ctf-writer/utils.h +++ b/src/ctf-writer/utils.h @@ -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) {