opr: Flag assertion error handles as noreturn
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 31 Mar 2012 18:52:58 +0000 (14:52 -0400)
committerDerrick Brashear <shadow@dementix.org>
Mon, 9 Apr 2012 01:21:47 +0000 (18:21 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/opr/opr.h

index d7db2cc..d42f6db 100644 (file)
@@ -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)