From ce53ba7aa47854de310cd47b9553a2ae8ff32aee Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 28 Jun 2019 16:45:01 -0400 Subject: [PATCH] lib: internal: define `BT_ASSERT_{PRE,POST}_SUPPORTED` in headers This is to make some headers require that precondition and postcondition assertion macros exist when including them, just like `src/lib/logging.h` defines `BT_LIB_LOG_SUPPORTED` for the same reason. Signed-off-by: Philippe Proulx Change-Id: Ia2db609ae540b29129b9260c237f8b8d9657d977 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1576 Tested-by: jenkins Reviewed-by: Simon Marchi --- src/lib/assert-post.h | 2 ++ src/lib/assert-pre.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/lib/assert-post.h b/src/lib/assert-post.h index 3e1a25d7..9776bde0 100644 --- a/src/lib/assert-post.h +++ b/src/lib/assert-post.h @@ -112,4 +112,6 @@ # define BT_ASSERT_POST_MSG(_fmt, ...) #endif /* BT_DEV_MODE */ +#define BT_ASSERT_POST_SUPPORTED + #endif /* BABELTRACE_ASSERT_POST_INTERNAL_H */ diff --git a/src/lib/assert-pre.h b/src/lib/assert-pre.h index 2aae8f79..1cb0fec7 100644 --- a/src/lib/assert-pre.h +++ b/src/lib/assert-pre.h @@ -136,4 +136,6 @@ "Index is out of bounds: index=%" PRIu64 ", " \ "count=%" PRIu64, (uint64_t) (_index), (uint64_t) (_length)) +#define BT_ASSERT_PRE_SUPPORTED + #endif /* BABELTRACE_ASSERT_PRE_INTERNAL_H */ -- 2.34.1