X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Ftrace-ir%2Fevent-class.c;h=22211cd1aae8a32d02d2801d5222bf06a01e01aa;hb=01d3ee63d4a69bdaa048a46e5f5bd63d89e97568;hp=464dd00f3d26416da025407b497c929e5d6b8328;hpb=864aa43f27af7a2e671a148d11b636aafa10409b;p=babeltrace.git diff --git a/src/lib/trace-ir/event-class.c b/src/lib/trace-ir/event-class.c index 464dd00f..22211cd1 100644 --- a/src/lib/trace-ir/event-class.c +++ b/src/lib/trace-ir/event-class.c @@ -35,6 +35,7 @@ #include "lib/value.h" #include "common/assert.h" #include +#include #include #include "attributes.h" @@ -177,6 +178,7 @@ end: struct bt_event_class *bt_event_class_create( struct bt_stream_class *stream_class) { + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class"); BT_ASSERT_PRE(stream_class->assigns_automatic_event_class_id, "Stream class does not automatically assigns event class IDs: " @@ -188,6 +190,7 @@ struct bt_event_class *bt_event_class_create( struct bt_event_class *bt_event_class_create_with_id( struct bt_stream_class *stream_class, uint64_t id) { + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE(!stream_class->assigns_automatic_event_class_id, "Stream class automatically assigns event class IDs: " "%![sc-]+S", stream_class); @@ -203,6 +206,7 @@ const char *bt_event_class_get_name(const struct bt_event_class *event_class) enum bt_event_class_set_name_status bt_event_class_set_name( struct bt_event_class *event_class, const char *name) { + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(event_class, "Event class"); BT_ASSERT_PRE_NON_NULL(name, "Name"); BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); @@ -250,6 +254,7 @@ enum bt_event_class_set_emf_uri_status bt_event_class_set_emf_uri( struct bt_event_class *event_class, const char *emf_uri) { + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(event_class, "Event class"); BT_ASSERT_PRE_NON_NULL(emf_uri, "EMF URI"); BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); @@ -303,6 +308,7 @@ bt_event_class_set_specific_context_field_class( .event_payload = NULL, }; + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(event_class, "Event class"); BT_ASSERT_PRE_NON_NULL(field_class, "Field class"); BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); @@ -367,6 +373,7 @@ bt_event_class_set_payload_field_class( .event_payload = field_class, }; + BT_ASSERT_PRE_NO_ERROR(); BT_ASSERT_PRE_NON_NULL(event_class, "Event class"); BT_ASSERT_PRE_NON_NULL(field_class, "Field class"); BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class);