From 8da218a7a2ee0d0c0a0741f1007ebce0bf22584a Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Fri, 16 Sep 2022 16:45:15 -0400 Subject: Update coverity model `uu_panic()` needs to be modelled and the definition of `vpanic()` from the original coverity model was missing `__coverity_format_string_sink__()`. We also model `libspl_assertf()` as part of an attempt to eliminate false positives. Reviewed-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #13901 --- contrib/coverity/model.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'contrib/coverity') diff --git a/contrib/coverity/model.c b/contrib/coverity/model.c index ee2d01e7f..d27abd038 100644 --- a/contrib/coverity/model.c +++ b/contrib/coverity/model.c @@ -70,9 +70,24 @@ panic(const char *fmt, ...) void vpanic(const char *fmt, va_list adx) { - (void) fmt; (void) adx; + __coverity_format_string_sink__(fmt); + __coverity_panic__(); +} + +void +uu_panic(const char *format, ...) +{ + __coverity_format_string_sink__(format); + __coverity_panic__(); +} + +int +libspl_assertf(const char *file, const char *func, int line, + const char *format, ...) +{ + __coverity_format_string_sink__(format); __coverity_panic__(); } -- cgit v1.2.3