diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2015-10-19 21:11:15 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2015-10-19 22:39:53 -0400 |
commit | 3e94db236fe47538aae8fbdf31e6f321188c09a0 (patch) | |
tree | 0adbf01bb379082f044b5caa247aea8892f5695f /handy.h | |
parent | d39e0fc0a8a7982ea2e9c66de06e3df28bed950e (diff) | |
download | perl-3e94db236fe47538aae8fbdf31e6f321188c09a0.tar.gz |
Make __ASSERT__() empty under Coverity, avoiding many false alerts.
(As suggested by khw.)
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -280,8 +280,13 @@ typedef U64TYPE U64; /* This is a helper macro to avoid preprocessor issues, replaced by nothing * unless under DEBUGGING, where it expands to an assert of its argument, * followed by a comma (hence the comma operator). If we just used a straight - * assert(), we would get a comma with nothing before it when not DEBUGGING */ -#ifdef DEBUGGING + * assert(), we would get a comma with nothing before it when not DEBUGGING. + * + * We also use empty definition under Coverity since the __ASSERT__ + * checks often check for things that Really Cannot Happen, and Coverity + * detects that and gets all excited. */ + +#if defined(DEBUGGING) && !defined(__COVERITY__) # define __ASSERT_(statement) assert(statement), #else # define __ASSERT_(statement) |