Alexandre Julliard : ntdll: Fix a couple of warnings on Solaris.

Alexandre Julliard julliard at winehq.org
Thu Mar 5 10:31:12 CST 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Mar  5 14:40:16 2009 +0100

ntdll: Fix a couple of warnings on Solaris.

---

 dlls/ntdll/signal_i386.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 32db810..0b7c25b 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -636,7 +636,7 @@ static void wine_sigacthandler( int signal, siginfo_t *siginfo, void *sigcontext
 
     __asm__ __volatile__("mov %ss,%ax; mov %ax,%ds; mov %ax,%es");
 
-    thread_data = get_current_teb()->SystemReserved2;
+    thread_data = (struct ntdll_thread_data *)get_current_teb()->SystemReserved2;
     wine_set_fs( thread_data->fs );
     wine_set_gs( thread_data->gs );
 
@@ -672,7 +672,6 @@ typedef void (WINAPI *raise_func)( EXCEPTION_RECORD *rec, CONTEXT *context );
 static inline void *init_handler( const SIGCONTEXT *sigcontext, WORD *fs, WORD *gs )
 {
     TEB *teb = get_current_teb();
-    struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SystemReserved2;
 
     /* get %fs and %gs at time of the fault */
 #ifdef FS_sig
@@ -687,8 +686,11 @@ static inline void *init_handler( const SIGCONTEXT *sigcontext, WORD *fs, WORD *
 #endif
 
 #ifndef __sun  /* see above for Solaris handling */
-    wine_set_fs( thread_data->fs );
-    wine_set_gs( thread_data->gs );
+    {
+        struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SystemReserved2;
+        wine_set_fs( thread_data->fs );
+        wine_set_gs( thread_data->gs );
+    }
 #endif
 
     if (!wine_ldt_is_system(CS_sig(sigcontext)) ||




More information about the wine-cvs mailing list