From: Simon Wilkinson Date: Sat, 31 Mar 2012 18:52:58 +0000 (-0400) Subject: opr: Flag assertion error handles as noreturn X-Git-Tag: upstream/1.8.0_pre1^2~2591 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8f39150b2718d5d758ba9d02bf3becd9c8947120;p=packages%2Fo%2Fopenafs.git opr: Flag assertion error handles as noreturn Flag both of our assertion error handlers as being AFS_NORETURN, so that static analysers can truncate their decision trees, and avoid false positives, based on assertion statements. Change-Id: I511c9c19a714cd3eaa5a886bf9561f577244360e Reviewed-on: http://gerrit.openafs.org/7101 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/opr/opr.h b/src/opr/opr.h index d7db2cc02..d42f6db98 100644 --- a/src/opr/opr.h +++ b/src/opr/opr.h @@ -15,8 +15,8 @@ extern void opr_NTAbort(void); # define opr_abort() abort() #endif -extern void opr_AssertionFailed(char *, int); -extern void opr_AssertFailU(const char *, const char *, int); +extern void opr_AssertionFailed(char *, int) AFS_NORETURN; +extern void opr_AssertFailU(const char *, const char *, int) AFS_NORETURN; #define opr_Assert(ex) \ do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)