You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/06/06 06:13:43 UTC

[08/14] git commit: Enable assertions for the clang static analyzer

Enable assertions for the clang static analyzer

The clang analyzer needs to see all assertions so that it knows to
trim the call graph. This greatly reduces the number of false NULL
dereferences.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b33a2a95
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b33a2a95
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b33a2a95

Branch: refs/heads/3.3.x
Commit: b33a2a950e1f48ea7f326a95637c01497a18d109
Parents: 25251ba
Author: James Peach <jp...@apache.org>
Authored: Tue Jun 4 21:07:23 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Jun 4 21:07:23 2013 -0700

----------------------------------------------------------------------
 lib/ts/ink_assert.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b33a2a95/lib/ts/ink_assert.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_assert.h b/lib/ts/ink_assert.h
index bf490cc..ead610c 100644
--- a/lib/ts/ink_assert.h
+++ b/lib/ts/ink_assert.h
@@ -46,7 +46,7 @@ extern "C"
 
   inkcoreapi void _ink_assert(const char *a, const char *f, int l) TS_NORETURN;
 
-#ifdef DEBUG
+#if defined(DEBUG) || defined(__clang_analyzer__)
 #define ink_assert(EX) ( \
             (void)(likely(EX) ? (void)0 : _ink_assert(#EX, __FILE__, __LINE__))\
 )