lib: remove `BT_ASSERT_PRE_FUNC`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 18 Jul 2019 05:33:32 +0000 (01:33 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 18 Jul 2019 13:42:13 +0000 (09:42 -0400)
`BT_ASSERT_PRE_FUNC` is defined to nothing, so remove it.

This should have been done in bdb288b3e94e412a33c8647d44f6cfac66ca0665.
`BT_ASSERT_PRE_DEV_FUNC` is defined in non-developer mode to mark the
function as unused.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I382f87693a6079eeb13f537e2669402995c58f41
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1721

src/lib/assert-pre.h
src/lib/graph/graph.c
src/lib/graph/message/event.c
src/lib/trace-ir/event-class.c
src/lib/trace-ir/field-class.c
src/lib/trace-ir/stream-class.c
src/lib/trace-ir/stream.c
src/lib/trace-ir/trace-class.c
src/lib/trace-ir/trace.c

index 942851f21fb7b2684fdc7f5b3942447d1ae0fda2..a470a63b15e86c04feb924dfddbf3ce7189ef340 100644 (file)
@@ -52,7 +52,6 @@
  *
  * Example:
  *
- *     BT_ASSERT_PRE_FUNC
  *     static inline bool check_complex_precond(...)
  *     {
  *         ...
                "Index is out of bounds: index=%" PRIu64 ", "           \
                "count=%" PRIu64, (uint64_t) (_index), (uint64_t) (_length))
 
-/*
- * Marks a function as being only used within a BT_ASSERT_PRE() context.
- */
-#define BT_ASSERT_PRE_FUNC
-
 #ifdef BT_DEV_MODE
 /* Developer mode version of BT_ASSERT_PRE_MSG(). */
 # define BT_ASSERT_PRE_DEV_MSG(_fmt, ...)                              \
 # define BT_ASSERT_PRE_DEV_VALID_INDEX(_index, _length)                        \
        BT_ASSERT_PRE_VALID_INDEX((_index), (_length))
 
-/* Developer mode version of `BT_ASSERT_PRE_FUNC`. */
+/*
+ * Marks a function as being only used within a BT_ASSERT_PRE_DEV()
+ * context.
+ */
 # define BT_ASSERT_PRE_DEV_FUNC
 #else
 # define BT_ASSERT_PRE_DEV_MSG(_fmt, ...)
index 076fc5fd1a439a2d7d2f088d18c1e2618321bbf6..af6b2b2dc804a973d1ce6540e9013744cc4017bf 100644 (file)
@@ -1234,7 +1234,6 @@ void bt_graph_remove_connection(struct bt_graph *graph,
        g_ptr_array_remove(graph->connections, connection);
 }
 
-BT_ASSERT_PRE_FUNC
 static inline
 bool component_name_exists(struct bt_graph *graph, const char *name)
 {
index 54254e77fb27e133b66e0922aa5ab44265d5280f..285bf8aa86715fb6fae5be4a3f63f4560b8900bb 100644 (file)
@@ -44,7 +44,6 @@
 
 #include "event.h"
 
-BT_ASSERT_PRE_FUNC
 static inline bool event_class_has_trace(struct bt_event_class *event_class)
 {
        struct bt_stream_class *stream_class;
index efbd676654cdfaa8e6cca8afb329e5fc3f9b8b44..c5e5230e160d049b46f80da2445716de274762bb 100644 (file)
@@ -85,7 +85,6 @@ void free_event(struct bt_event *event,
        bt_event_destroy(event);
 }
 
-BT_ASSERT_PRE_FUNC
 static
 bool event_class_id_is_unique(const struct bt_stream_class *stream_class,
                uint64_t id)
index 98b7a6d798f0e6f0a6b5650c121c122d502fb96d..4ea1d4565120a7f6b23cbcb4ac9e0a4f3f7520d3 100644 (file)
@@ -133,7 +133,6 @@ uint64_t bt_field_class_integer_get_field_value_range(
        return int_fc->range;
 }
 
-BT_ASSERT_PRE_FUNC
 static
 bool size_is_valid_for_enumeration_field_class(struct bt_field_class *fc,
                uint64_t size)
index aeccff72cac2e12f0ebd4779afbf12463fbee151..c26cc31cde6c679434f30277122092a9f2a6d172 100644 (file)
@@ -85,7 +85,6 @@ void free_field_wrapper(struct bt_field_wrapper *field_wrapper,
        bt_field_wrapper_destroy((void *) field_wrapper);
 }
 
-BT_ASSERT_PRE_FUNC
 static
 bool stream_class_id_is_unique(const struct bt_trace_class *tc, uint64_t id)
 {
index bac7cc5af557003421a151acc7fea9f865fcf2eb..23692399f6b35cc0dca4279295c4eba19fa441fd 100644 (file)
@@ -70,7 +70,6 @@ void bt_stream_free_packet(struct bt_packet *packet, struct bt_stream *stream)
        bt_packet_destroy(packet);
 }
 
-BT_ASSERT_PRE_FUNC
 static inline
 bool stream_id_is_unique(struct bt_trace *trace,
                struct bt_stream_class *stream_class, uint64_t id)
index 23a6a7e7b3450db0f9176d5a2ed63df46850d0c7..620e8f6daeb3375b0bc5bd3e006d3e1f82c5f3a9 100644 (file)
@@ -198,7 +198,6 @@ enum bt_trace_class_add_listener_status bt_trace_class_add_destruction_listener(
        return BT_FUNC_STATUS_OK;
 }
 
-BT_ASSERT_PRE_FUNC
 static
 bool has_listener_id(const struct bt_trace_class *tc, uint64_t listener_id)
 {
index 6deecb1d80d4eef7f24ba673c00126b3f0eaefa7..1085d890bf5b457dab438ea156e8dbdcc8abd055 100644 (file)
@@ -444,7 +444,6 @@ enum bt_trace_add_listener_status bt_trace_add_destruction_listener(
        return BT_FUNC_STATUS_OK;
 }
 
-BT_ASSERT_PRE_FUNC
 static
 bool has_listener_id(const struct bt_trace *trace, uint64_t listener_id)
 {
This page took 0.030424 seconds and 4 git commands to generate.