[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-dev
Subject: Re: svn commit: r1295148 - /subversion/trunk/subversion/include/svn_error.h
From: Greg Stein <gstein () gmail ! com>
Date: 2012-02-29 21:29:30
Message-ID: CABD8fLVQx8YoyoJtdJEhOgVKPk98iauWxMhWzro8q9b2FNSS9w () mail ! gmail ! com
[Download RAW message or body]
Thanks for the recompile.
;-)
On Feb 29, 2012 10:20 AM, <hwright@apache.org> wrote:
> 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.
>
>
>
[Attachment #3 (text/html)]
<p>Thanks for the recompile.</p>
<p>;-)</p>
<div class="gmail_quote">On Feb 29, 2012 10:20 AM, <<a \
href="mailto:hwright@apache.org">hwright@apache.org</a>> wrote:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: hwright<br>
Date: Wed Feb 29 15:20:18 2012<br>
New Revision: 1295148<br>
<br>
URL: <a href="http://svn.apache.org/viewvc?rev=1295148&view=rev" \
target="_blank">http://svn.apache.org/viewvc?rev=1295148&view=rev</a><br> \
Log:<br> When running the clang static analyzer, it is useful to use a vanilla \
assert,<br> rather than our custom one, so make it so.<br>
<br>
* subversion/include/svn_error.h<br>
(SVN_ERR_ASSERT): Optionally alias to assert() if running in the clang static<br>
analyzer.<br>
<br>
Modified:<br>
subversion/trunk/subversion/include/svn_error.h<br>
<br>
Modified: subversion/trunk/subversion/include/svn_error.h<br>
URL: <a href="http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error.h?rev=1295148&r1=1295147&r2=1295148&view=diff" \
target="_blank">http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error.h?rev=1295148&r1=1295147&r2=1295148&view=diff</a><br>
==============================================================================<br>
--- subversion/trunk/subversion/include/svn_error.h (original)<br>
+++ subversion/trunk/subversion/include/svn_error.h Wed Feb 29 15:20:18 2012<br>
@@ -479,11 +479,16 @@ svn_error_t *svn_error_purge_tracing(svn<br>
*<br>
* @since New in 1.6.<br>
*/<br>
+#ifdef __clang_analyzer__<br>
+#include <assert.h><br>
+#define SVN_ERR_ASSERT(expr) assert((expr))<br>
+#else<br>
#define SVN_ERR_ASSERT(expr) \<br>
do { \<br>
if (!(expr)) \<br>
SVN_ERR(svn_error__malfunction(TRUE, __FILE__, __LINE__, #expr)); \<br>
} while (0)<br>
+#endif<br>
<br>
/** Similar to SVN_ERR_ASSERT(), but without the option of returning<br>
* an error to the calling function.<br>
<br>
<br>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic