Skip to content

Commit 2a41263

Browse files
committed
nsi_tracing: Annotate functions as noreturn
Let's annotate functions which do not return as noreturn so it is easier for code analyzers and the compiler to do their job. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent f0307c1 commit 2a41263

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

common/src/include/nsi_tracing.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define NSI_COMMON_SRC_INCL_NSI_TRACING_H
99

1010
#include <stdarg.h>
11+
#include "nsi_utils.h"
1112

1213
#ifdef __cplusplus
1314
extern "C" {
@@ -21,10 +22,10 @@ extern "C" {
2122
* All print()/vprint() APIs take the same arguments as printf()/vprintf().
2223
*/
2324

24-
void nsi_print_error_and_exit(const char *format, ...);
25+
NSI_FUNC_NORETURN void nsi_print_error_and_exit(const char *format, ...);
2526
void nsi_print_warning(const char *format, ...);
2627
void nsi_print_trace(const char *format, ...);
27-
void nsi_vprint_error_and_exit(const char *format, va_list vargs);
28+
NSI_FUNC_NORETURN void nsi_vprint_error_and_exit(const char *format, va_list vargs);
2829
void nsi_vprint_warning(const char *format, va_list vargs);
2930
void nsi_vprint_trace(const char *format, va_list vargs);
3031

0 commit comments

Comments
 (0)