[project @ 2000-04-14 16:47:43 by panne]
authorpanne <unknown>
Fri, 14 Apr 2000 16:47:43 +0000 (16:47 +0000)
committerpanne <unknown>
Fri, 14 Apr 2000 16:47:43 +0000 (16:47 +0000)
Reduce number of warnings and raise chances of successful compilation
when *not* building an interpreter :-)

ghc/rts/Exception.hc
ghc/rts/GC.c
ghc/rts/Prelude.c
ghc/rts/Schedule.c
ghc/rts/Signals.c

index 294fa85..3231f50 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Exception.hc,v 1.11 2000/03/17 14:37:21 simonmar Exp $
+ * $Id: Exception.hc,v 1.12 2000/04/14 16:47:43 panne Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -17,6 +17,9 @@
 #if defined(PAR)
 # include "FetchMe.h"
 #endif
+#if defined(PROFILING)
+# include "Profiling.h"
+#endif
 
 /* -----------------------------------------------------------------------------
    Exception Primitives
index d3056b6..9a18864 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.79 2000/04/14 15:18:06 sewardj Exp $
+ * $Id: GC.c,v 1.80 2000/04/14 16:47:43 panne Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -142,7 +142,9 @@ lnat g0s0_pcnt_kept = 30;   /* percentage of g0s0 live at last minor GC */
 static StgClosure * evacuate                ( StgClosure *q );
 static void         zero_static_object_list ( StgClosure* first_static );
 static void         zero_mutable_list       ( StgMutClosure *first );
+#if 0
 static void         revert_dead_CAFs        ( void );
+#endif
 
 static rtsBool      traverse_weak_ptr_list  ( void );
 static void         cleanup_weak_ptr_list   ( StgWeak **list );
index 9cc426f..21ebc57 100644 (file)
@@ -1,6 +1,6 @@
 
 /* -----------------------------------------------------------------------------
- * $Id: Prelude.c,v 1.5 2000/04/03 17:27:10 sewardj Exp $
+ * $Id: Prelude.c,v 1.6 2000/04/14 16:47:43 panne Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -95,6 +95,7 @@ INFO_TABLE_CONSTR(hugs_standalone_StablePtr_static_info,Hugs_CONSTR_entry,
 */
 void fixupRTStoPreludeRefs ( void*(*ask_hugs_dynamic_linker)(char*) )
 {
+  (void)ask_hugs_dynamic_linker;   /* keep gcc -Wall happy */
 #if defined(INTERPRETER)
   if (ask_hugs_dynamic_linker == NULL) {
 
index 1fde2f0..db8bb2e 100644 (file)
@@ -1,5 +1,5 @@
 /* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.67 2000/04/14 15:18:07 sewardj Exp $
+ * $Id: Schedule.c,v 1.68 2000/04/14 16:47:43 panne Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -1572,8 +1572,8 @@ initScheduler(void)
   context_switch = 0;
   interrupted    = 0;
 
-  ecafList = END_ECAF_LIST;
 #ifdef INTERPRETER
+  ecafList = END_ECAF_LIST;
   clearECafTable();
 #endif
 
index d5f0c75..ee5ef81 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Signals.c,v 1.16 2000/04/04 10:04:47 simonmar Exp $
+ * $Id: Signals.c,v 1.17 2000/04/14 16:47:43 panne Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -19,6 +19,7 @@
 
 #ifndef PAR
 
+/* SUP: The type of handlers is a little bit, well, doubtful... */
 static StgInt *handlers = NULL; /* Dynamically grown array of signal handlers */
 static StgInt nHandlers = 0;    /* Size of handlers array */
 
@@ -97,7 +98,7 @@ generic_handler(int sig)
        circumstances, depending on the signal.  
     */
 
-    *next_pending_handler++ = deRefStablePtr(handlers[sig]);
+    *next_pending_handler++ = deRefStablePtr(stgCast(StgStablePtr,handlers[sig]));
 
     /* stack full? */
     if (next_pending_handler == &pending_handler_buf[N_PENDING_HANDLERS]) {
@@ -196,7 +197,7 @@ sig_install(StgInt sig, StgInt spi, StgStablePtr handler, sigset_t *mask)
        * by freeing the previous handler if there was one.
        */       
       if (previous_spi >= 0) {
-         freeStablePtr(handlers[sig]);
+         freeStablePtr(stgCast(StgStablePtr,handlers[sig]));
       }
       return STG_SIG_ERR;
     }