Author: tkreuzer
Date: Tue Mar 10 00:10:57 2015
New Revision: 66643
URL:
http://svn.reactos.org/svn/reactos?rev=66643&view=rev
Log:
[PSDK]
Move __analysis_assume to sal.h (like in newer Windows SDKs) and define it (together with
_Analysis_assume_) to "((void)0)" instead of to nothing, to allow it to be used
with a comma.
Modified:
trunk/reactos/include/psdk/sal.h
trunk/reactos/include/psdk/sal_old.h
Modified: trunk/reactos/include/psdk/sal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sal.h?rev=666…
==============================================================================
--- trunk/reactos/include/psdk/sal.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/sal.h [iso-8859-1] Tue Mar 10 00:10:57 2015
@@ -423,6 +423,7 @@
#define _Analysis_noreturn_
_SAL2_NAME(_Analysis_noreturn_) [SAL_annotes(Name="SAL_terminates")]
#define _Analysis_assume_(expr) __assume(expr)
+#define __analysis_assume(expr) __assume(expr)
#define _Check_return_
_SAL2_NAME(_Check_return_) [SA_Post(MustCheck=SA_Yes)]
#define _COM_Outptr_
_SAL2_NAME(_COM_Outptr_) _Group_(_Outptr_ _On_failure_(_Deref_post_null_))
@@ -1098,7 +1099,8 @@
#define __inner_typefix(ctype)
#define _Always_(annos)
#define _Analysis_noreturn_
-#define _Analysis_assume_(expr)
+#define _Analysis_assume_(expr) ((void)0)
+#define __analysis_assume(expr) ((void)0)
#define _At_(target, annos)
#define _At_buffer_(target, iter, bound, annos)
#define _Check_return_
Modified: trunk/reactos/include/psdk/sal_old.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sal_old.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/sal_old.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/sal_old.h [iso-8859-1] Tue Mar 10 00:10:57 2015
@@ -69,9 +69,6 @@
#define __refparam __deref __notreadonly
#define __valid __declspec("SAL_valid")
#define __writableTo(size)
__declspec("SAL_writableTo("SPECSTRINGIZE(size)")")
-#ifndef __analysis_assume
-#define __analysis_assume(expr) __assume(expr)
-#endif
#else
@@ -108,9 +105,6 @@
#define __refparam
#define __valid
#define __writableTo(size)
-#ifndef __analysis_assume
-#define __analysis_assume(expr)
-#endif
#endif /* defined(_PREFAST_) && !defined(__midl) */