From df5f7afb1435f47bf9c92f62647a5f06d7aa8a3e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 14 May 2019 13:53:25 -0700 Subject: [PATCH] usnic: fix Coverity false positives Add some Coverity inline notation to tell Coverity that these functions never return. Signed-off-by: Jeff Squyres --- opal/mca/btl/usnic/btl_usnic_util.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/opal/mca/btl/usnic/btl_usnic_util.c b/opal/mca/btl/usnic/btl_usnic_util.c index 54a7be513a..8b19f161f0 100644 --- a/opal/mca/btl/usnic/btl_usnic_util.c +++ b/opal/mca/btl/usnic/btl_usnic_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 Cisco Systems, Inc. All rights reserved + * Copyright (c) 2013-2019 Cisco Systems, Inc. All rights reserved * $COPYRIGHT$ * * Additional copyrights may follow @@ -20,6 +20,10 @@ #include "btl_usnic_util.h" +// The following comment tells Coverity that this function does not return. +// See https://scan.coverity.com/tune. + +/* coverity[+kill] */ void opal_btl_usnic_exit(opal_btl_usnic_module_t *module) { if (NULL == module) { @@ -61,7 +65,14 @@ void opal_btl_usnic_exit(opal_btl_usnic_module_t *module) /* * Simple utility in a .c file, mainly so that inline functions in .h * files don't need to include the show_help header file. + * + * The following comment tells Coverity that this function does not + * return. See https://scan.coverity.com/tune. Technically, we + * shouldn't need this, because opal_btl_usnic_exit() has the same + * annotation, but let's just help Coverity out. */ + +/* coverity[+kill] */ void opal_btl_usnic_util_abort(const char *msg, const char *file, int line) { opal_show_help("help-mpi-btl-usnic.txt", "internal error after init",