From ce6da4fd76d8f00d4b1cd60bbd40db64816db997 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 5 Mar 2015 17:30:43 -0500 Subject: [PATCH] Mark internal IR field function pointers as const MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/event-fields.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/formats/ctf/ir/event-fields.c b/formats/ctf/ir/event-fields.c index 8bc0557b..aefb3af2 100644 --- a/formats/ctf/ir/event-fields.c +++ b/formats/ctf/ir/event-fields.c @@ -150,7 +150,7 @@ static int increase_packet_size(struct ctf_stream_pos *pos); static -struct bt_ctf_field *(*field_create_funcs[])( +struct bt_ctf_field *(* const field_create_funcs[])( struct bt_ctf_field_type *) = { [CTF_TYPE_INTEGER] = bt_ctf_field_integer_create, [CTF_TYPE_ENUM] = bt_ctf_field_enumeration_create, @@ -164,7 +164,7 @@ struct bt_ctf_field *(*field_create_funcs[])( }; static -void (*field_destroy_funcs[])(struct bt_ctf_field *) = { +void (* const field_destroy_funcs[])(struct bt_ctf_field *) = { [CTF_TYPE_INTEGER] = bt_ctf_field_integer_destroy, [CTF_TYPE_ENUM] = bt_ctf_field_enumeration_destroy, [CTF_TYPE_FLOAT] = @@ -177,7 +177,7 @@ void (*field_destroy_funcs[])(struct bt_ctf_field *) = { }; static -int (*field_validate_funcs[])(struct bt_ctf_field *) = { +int (* const field_validate_funcs[])(struct bt_ctf_field *) = { [CTF_TYPE_INTEGER] = bt_ctf_field_generic_validate, [CTF_TYPE_ENUM] = bt_ctf_field_enumeration_validate, [CTF_TYPE_FLOAT] = bt_ctf_field_generic_validate, @@ -189,7 +189,7 @@ int (*field_validate_funcs[])(struct bt_ctf_field *) = { }; static -int (*field_reset_funcs[])(struct bt_ctf_field *) = { +int (* const field_reset_funcs[])(struct bt_ctf_field *) = { [CTF_TYPE_INTEGER] = bt_ctf_field_generic_reset, [CTF_TYPE_ENUM] = bt_ctf_field_enumeration_reset, [CTF_TYPE_FLOAT] = bt_ctf_field_generic_reset, @@ -201,7 +201,7 @@ int (*field_reset_funcs[])(struct bt_ctf_field *) = { }; static -int (*field_serialize_funcs[])(struct bt_ctf_field *, +int (* const field_serialize_funcs[])(struct bt_ctf_field *, struct ctf_stream_pos *) = { [CTF_TYPE_INTEGER] = bt_ctf_field_integer_serialize, [CTF_TYPE_ENUM] = bt_ctf_field_enumeration_serialize, @@ -215,7 +215,8 @@ int (*field_serialize_funcs[])(struct bt_ctf_field *, }; static -int (*field_copy_funcs[])(struct bt_ctf_field *, struct bt_ctf_field *) = { +int (* const field_copy_funcs[])(struct bt_ctf_field *, + struct bt_ctf_field *) = { [CTF_TYPE_INTEGER] = bt_ctf_field_integer_copy, [CTF_TYPE_ENUM] = bt_ctf_field_enumeration_copy, [CTF_TYPE_FLOAT] = bt_ctf_field_floating_point_copy, -- 2.34.1