subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1295148 - /subversion/trunk/subversion/include/svn_error.h
Date Wed, 29 Feb 2012 15:20:18 GMT
Author: hwright
Date: Wed Feb 29 15:20:18 2012
New Revision: 1295148

URL: http://svn.apache.org/viewvc?rev=1295148&view=rev
Log:
When running the clang static analyzer, it is useful to use a vanilla assert,
rather than our custom one, so make it so.

* subversion/include/svn_error.h
  (SVN_ERR_ASSERT): Optionally alias to assert() if running in the clang static
    analyzer.

Modified:
    subversion/trunk/subversion/include/svn_error.h

Modified: subversion/trunk/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error.h?rev=1295148&r1=1295147&r2=1295148&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_error.h (original)
+++ subversion/trunk/subversion/include/svn_error.h Wed Feb 29 15:20:18 2012
@@ -479,11 +479,16 @@ svn_error_t *svn_error_purge_tracing(svn
  *
  * @since New in 1.6.
  */
+#ifdef __clang_analyzer__
+#include <assert.h>
+#define SVN_ERR_ASSERT(expr)       assert((expr))
+#else
 #define SVN_ERR_ASSERT(expr)                                            \
   do {                                                                  \
     if (!(expr))                                                        \
       SVN_ERR(svn_error__malfunction(TRUE, __FILE__, __LINE__, #expr)); \
   } while (0)
+#endif
 
 /** Similar to SVN_ERR_ASSERT(), but without the option of returning
  * an error to the calling function.



Mime
View raw message