[SDK] Fix dummy SEH to always reference the parameter in _SEH2_EXCEPT
authorHervé Poussineau <hpoussin@reactos.org>
Thu, 26 Mar 2020 15:24:59 +0000 (16:24 +0100)
committerHervé Poussineau <hpoussin@reactos.org>
Thu, 26 Mar 2020 15:39:16 +0000 (16:39 +0100)
Otherwise, we may have compilation errors if this parameter is the name of a static function.

sdk/include/reactos/libs/pseh/pseh2.h

index 1bbce69..6022638 100644 (file)
@@ -44,9 +44,9 @@ extern int _SEH2_VolatileExceptionCode;
 
 #define _SEH2_TRY  {
 #define _SEH2_FINALLY }  {
 
 #define _SEH2_TRY  {
 #define _SEH2_FINALLY }  {
-#define _SEH2_EXCEPT(...) } if (_SEH2_Volatile0) {
+#define _SEH2_EXCEPT(...) } if (_SEH2_Volatile0 || (0 && (__VA_ARGS__))) {
 #define _SEH2_END }
 #define _SEH2_END }
-#define _SEH2_GetExceptionInformation()
+#define _SEH2_GetExceptionInformation() 0
 #define _SEH2_GetExceptionCode() _SEH2_VolatileExceptionCode
 #define _SEH2_AbnormalTermination() (0)
 #define _SEH2_YIELD(STMT_) STMT_
 #define _SEH2_GetExceptionCode() _SEH2_VolatileExceptionCode
 #define _SEH2_AbnormalTermination() (0)
 #define _SEH2_YIELD(STMT_) STMT_