trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject git commit: Enable assertions for the clang static analyzer
Date Wed, 05 Jun 2013 04:08:37 GMT
Updated Branches:
  refs/heads/master 25251bab6 -> b33a2a950


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/master
Commit: b33a2a950e1f48ea7f326a95637c01497a18d109
Parents: 25251ba
Author: James Peach <jpeach@apache.org>
Authored: Tue Jun 4 21:07:23 2013 -0700
Committer: James Peach <jpeach@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__))\
 )


Mime
View raw message