From 1c07c8a447070164bc709950997f848fc0cc98fe Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 19 May 2017 21:46:25 -0400 Subject: [PATCH] Fix warnings emitted by `gcc -Wall` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- include/babeltrace/ctf-ir/event-internal.h | 1 - include/babeltrace/graph/notification-internal.h | 1 - lib/ctf-ir/field-types.c | 3 --- lib/ctf-ir/resolve.c | 3 ++- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/babeltrace/ctf-ir/event-internal.h b/include/babeltrace/ctf-ir/event-internal.h index c47e61f0..553a8687 100644 --- a/include/babeltrace/ctf-ir/event-internal.h +++ b/include/babeltrace/ctf-ir/event-internal.h @@ -64,7 +64,6 @@ int bt_ctf_event_serialize(struct bt_ctf_event *event, BT_HIDDEN void bt_ctf_event_freeze(struct bt_ctf_event *event); -BT_HIDDEN static inline struct bt_ctf_packet *bt_ctf_event_borrow_packet( struct bt_ctf_event *event) { diff --git a/include/babeltrace/graph/notification-internal.h b/include/babeltrace/graph/notification-internal.h index e13f660c..dac0defb 100644 --- a/include/babeltrace/graph/notification-internal.h +++ b/include/babeltrace/graph/notification-internal.h @@ -53,7 +53,6 @@ void bt_notification_init(struct bt_notification *notification, enum bt_notification_type type, bt_object_release_func release); -BT_HIDDEN static inline void bt_notification_freeze(struct bt_notification *notification) { notification->frozen = BT_TRUE; diff --git a/lib/ctf-ir/field-types.c b/lib/ctf-ir/field-types.c index 4a4d789c..78feecb9 100644 --- a/lib/ctf-ir/field-types.c +++ b/lib/ctf-ir/field-types.c @@ -4714,7 +4714,6 @@ struct bt_ctf_field_type *bt_ctf_field_type_string_copy( struct bt_ctf_field_type *type) { struct bt_ctf_field_type *copy; - struct bt_ctf_field_type_string *string; BT_LOGD("Copying string field type's: addr=%p", type); copy = bt_ctf_field_type_string_create(); @@ -4723,8 +4722,6 @@ struct bt_ctf_field_type *bt_ctf_field_type_string_copy( goto end; } - string = container_of(type, struct bt_ctf_field_type_string, - parent); BT_LOGD("Copied string field type: original-ft-addr=%p, copy-ft-addr=%p", type, copy); end: diff --git a/lib/ctf-ir/resolve.c b/lib/ctf-ir/resolve.c index 2ab457ab..86657da7 100644 --- a/lib/ctf-ir/resolve.c +++ b/lib/ctf-ir/resolve.c @@ -399,7 +399,8 @@ int ptokens_to_field_path(GList *ptokens, struct bt_ctf_field_path *field_path, bt_ctf_field_type_get_type_id(type); /* Find to which index corresponds the current path token */ - if (type_id == CTF_TYPE_ARRAY || type_id == CTF_TYPE_SEQUENCE) { + if (type_id == BT_CTF_FIELD_TYPE_ID_ARRAY || + type_id == BT_CTF_FIELD_TYPE_ID_SEQUENCE) { child_index = -1; } else { child_index = bt_ctf_field_type_get_field_index(type, -- 2.34.1