Alexandre Julliard : msvcp90: Add support for throwing bad cast exception to avoid unused variable warning.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Mar 4 09:22:16 CST 2015


Module: wine
Branch: master
Commit: e1cf7f5a2ef83460fd1e8639636b2ce68349232c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e1cf7f5a2ef83460fd1e8639636b2ce68349232c

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Mar  4 13:42:13 2015 +0900

msvcp90: Add support for throwing bad cast exception to avoid unused variable warning.

---

 dlls/msvcp90/cxx.h       | 1 +
 dlls/msvcp90/exception.c | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/dlls/msvcp90/cxx.h b/dlls/msvcp90/cxx.h
index cf63ac4..fe45bf6 100644
--- a/dlls/msvcp90/cxx.h
+++ b/dlls/msvcp90/cxx.h
@@ -303,6 +303,7 @@ typedef enum __exception_type {
     EXCEPTION_RERAISE,
     EXCEPTION,
     EXCEPTION_BAD_ALLOC,
+    EXCEPTION_BAD_CAST,
     EXCEPTION_LOGIC_ERROR,
     EXCEPTION_LENGTH_ERROR,
     EXCEPTION_OUT_OF_RANGE,
diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c
index da3a4bf..568fa5f 100644
--- a/dlls/msvcp90/exception.c
+++ b/dlls/msvcp90/exception.c
@@ -623,6 +623,11 @@ void throw_exception(exception_type et, const char *str)
         MSVCP_bad_alloc_ctor(&e, &addr);
         _CxxThrowException(&e, &bad_alloc_cxx_type);
     }
+    case EXCEPTION_BAD_CAST: {
+        bad_cast e;
+        MSVCP_bad_cast_ctor(&e, str);
+        _CxxThrowException(&e, &bad_cast_cxx_type);
+    }
     case EXCEPTION_LOGIC_ERROR: {
         logic_error e;
         MSVCP_logic_error_ctor(&e, &addr);




More information about the wine-cvs mailing list