From d79112475cf9bcfd5ed83736104705b943a14c1e Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sun, 27 Oct 2019 22:03:34 -0400 Subject: [PATCH] ctf-writer: Fix -Wredundant-decls warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/ctf-writer/utils.h | 3 --- 1 file changed, 3 deletions(-) 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) { -- 2.34.1