1
1

Mark the ompi_rte_abort() function as "no return"

This allows compilers to know that the code path(s) where
ompi_rte_abort() is invoked won't return (and therefore won't warn in
certain cases).

cmr=v1.8:reviewer=rhc

This commit was SVN r30891.
Этот коммит содержится в:
Jeff Squyres 2014-02-28 17:45:36 +00:00
родитель 3f845edfdd
Коммит 1bda304a35
2 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -3,6 +3,7 @@
* All rights reserved.
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
*
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -76,7 +77,8 @@ typedef orte_local_rank_t ompi_local_rank_t;
#define ompi_rte_proc_is_bound orte_proc_is_bound
/* Error handling objects and operations */
OMPI_DECLSPEC void ompi_rte_abort(int error_code, char *fmt, ...);
OMPI_DECLSPEC void __opal_attribute_noreturn__
ompi_rte_abort(int error_code, char *fmt, ...);
#define ompi_rte_abort_peers(a, b, c) orte_errmgr.abort_peers(a, b, c)
#define OMPI_RTE_ERRHANDLER_FIRST ORTE_ERRMGR_CALLBACK_FIRST
#define OMPI_RTE_ERRHANDLER_LAST ORTE_ERRMGR_CALLBACK_LAST

Просмотреть файл

@ -2,6 +2,8 @@
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*/
#include "ompi_config.h"
#include "ompi/constants.h"
@ -83,7 +85,10 @@ void ompi_rte_abort(int error_code, char *fmt, ...)
* We must exit in orte_ess.abort; all implementations of orte_ess.abort
* contain __opal_attribute_noreturn__
*/
/* No way to reach here */
/* No way to reach here, but put an exit() here a) just to cover
for bugs, and b) to let the compiler know we're honoring the
__opal_attribute_noreturn__. */
exit(-1);
}
/*