From c3d4e6506c49da34f4bfca7becde73f5ecf57b1b Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Fri, 28 Jun 2019 14:19:16 -0700 Subject: [PATCH] kernel: exclude stubs from code coverage These are stub functions that do nothing. Exclude from coverage reports. Signed-off-by: Andrew Boie --- include/kernel.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/kernel.h b/include/kernel.h index b42c45e77e0..7d1a777e080 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -207,7 +207,7 @@ struct _k_object_assignment { */ void z_object_init(void *obj); #else - +/* LCOV_EXCL_START */ #define K_THREAD_ACCESS_GRANT(thread, ...) /** @@ -250,6 +250,7 @@ static inline void k_object_access_all_grant(void *object) { ARG_UNUSED(object); } +/* LCOV_EXCL_STOP */ #endif /* !CONFIG_USERSPACE */ /** @@ -326,6 +327,7 @@ __syscall void *k_object_alloc(enum k_objects otype); */ void k_object_free(void *obj); #else +/* LCOV_EXCL_START */ static inline void *z_impl_k_object_alloc(enum k_objects otype) { ARG_UNUSED(otype); @@ -337,6 +339,7 @@ static inline void k_obj_free(void *obj) { ARG_UNUSED(obj); } +/* LCOV_EXCL_STOP */ #endif /* CONFIG_DYNAMIC_OBJECTS */ /** @} */