1.0.10.1: Cleanup code
authorNIIMI Satoshi <sa2c@users.sourceforge.net>
Wed, 26 Sep 2007 11:24:01 +0000 (11:24 +0000)
committerNIIMI Satoshi <sa2c@users.sourceforge.net>
Wed, 26 Sep 2007 11:24:01 +0000 (11:24 +0000)
Shut GCC warnings up.

src/runtime/alloc.c
src/runtime/alloc.h
src/runtime/gencgc.c
src/runtime/interr.c
src/runtime/thread.c
src/runtime/x86-arch.c
src/runtime/x86-assem.S
src/runtime/x86-bsd-os.c
src/runtime/x86-bsd-os.h
tools-for-build/grovel-headers.c
version.lisp-expr

index 78fc49f..2e056b5 100644 (file)
@@ -32,7 +32,7 @@
 #define ALIGNED_SIZE(n) ((n) + LOWTAG_MASK) & ~LOWTAG_MASK
 
 #ifdef LISP_FEATURE_GENCGC
-extern lispobj *alloc(int bytes);
+extern lispobj *alloc(long bytes);
 #endif
 
 static lispobj *
index 3735f9f..54f6902 100644 (file)
@@ -16,7 +16,7 @@
 #include "runtime.h"
 
 #ifdef LISP_FEATURE_GENCGC
-extern lispobj *alloc(int bytes);
+extern lispobj *alloc(long bytes);
 #endif
 
 extern lispobj alloc_cons(lispobj car, lispobj cdr);
index d16a44c..250ccee 100644 (file)
@@ -42,6 +42,7 @@
 #include "gc.h"
 #include "gc-internal.h"
 #include "thread.h"
+#include "alloc.h"
 #include "genesis/vector.h"
 #include "genesis/weak-pointer.h"
 #include "genesis/fdefn.h"
@@ -1095,7 +1096,7 @@ gc_heap_exhausted_error_or_lose (long available, long requested)
     }
     else {
         /* FIXME: assert free_pages_lock held */
-        thread_mutex_unlock(&free_pages_lock);
+        (void)thread_mutex_unlock(&free_pages_lock);
         funcall2(SymbolFunction(HEAP_EXHAUSTED_ERROR),
                  alloc_number(available), alloc_number(requested));
         lose("HEAP-EXHAUSTED-ERROR fell through");
@@ -4581,7 +4582,7 @@ gc_initialize_pointers(void)
  * The check for a GC trigger is only performed when the current
  * region is full, so in most cases it's not needed. */
 
-char *
+lispobj *
 alloc(long nbytes)
 {
     struct thread *thread=arch_os_get_current_thread();
index b24b726..5f7869c 100644 (file)
@@ -177,6 +177,6 @@ lispobj debug_print(lispobj string)
     fprintf(stderr, "%s\n",
             (char *)(((struct vector *)native_pointer(string))->data));
     /* shut GCC up about not using this, because that's the point.. */
-    if (untouched);
+    (void)untouched;
     return NIL;
 }
index 5b8ec4a..7c85b3e 100644 (file)
@@ -522,7 +522,7 @@ boolean create_os_thread(struct thread *th,os_thread_t *kid_tid)
     pthread_attr_t attr;
     sigset_t newset,oldset;
     boolean r=1;
-    int retcode, initcode, sizecode, addrcode;
+    int retcode = 0, initcode;
 
     FSHOW_SIGNAL((stderr,"/create_os_thread: creating new thread\n"));
 
@@ -551,7 +551,7 @@ boolean create_os_thread(struct thread *th,os_thread_t *kid_tid)
 #undef CONTROL_STACK_ADJUST
        (retcode = pthread_create
         (kid_tid,&attr,(void *(*)(void *))new_thread_trampoline,th))) {
-        FSHOW_SIGNAL((stderr, "init, size, addr = %d, %d, %d\n", initcode, sizecode, addrcode));
+        FSHOW_SIGNAL((stderr, "init = %d\n", initcode));
         FSHOW_SIGNAL((stderr, printf("pthread_create returned %d, errno %d\n", retcode, errno)));
         FSHOW_SIGNAL((stderr, "wanted stack size %d, min stack size %d\n",
                       THREAD_CONTROL_STACK_SIZE-16, PTHREAD_STACK_MIN));
index b417bd7..a871962 100644 (file)
@@ -204,7 +204,7 @@ arch_do_displaced_inst(os_context_t *context, unsigned int orig_inst)
     single_stepping = pc;
 
 #ifdef CANNOT_GET_TO_SINGLE_STEP_FLAG
-    *os_context_pc_addr(context) = (char *)pc - 9;
+    *os_context_pc_addr(context) = (os_context_register_t)((char *)pc - 9);
 #endif
 }
 \f
index 9470533..1afa6ee 100644 (file)
@@ -887,4 +887,3 @@ Lend_base:
         
 \f      
         END()
-        
\ No newline at end of file
index d493800..c44c7db 100644 (file)
@@ -156,7 +156,7 @@ int arch_os_thread_init(struct thread *thread) {
     struct segment_descriptor ldt_entry = { 0, 0, SDT_MEMRW, SEL_UPL, 1,
                                             0, 0, 1, 0, 0 };
 
-    set_data_desc_addr(&ldt_entry, (unsigned long) thread);
+    set_data_desc_addr(&ldt_entry, thread);
     set_data_desc_size(&ldt_entry, dynamic_values_bytes);
 
     n = i386_set_ldt(LDT_AUTO_ALLOC, (union descriptor*) &ldt_entry, 1);
@@ -226,8 +226,8 @@ os_restore_fp_control(os_context_t *context)
      * On earlier systems, it is shared in a whole process.
      */
 #if defined(__FreeBSD_version) && __FreeBSD_version >= 500040
-    struct envxmm *ex = (struct envxmm*)(&context->uc_mcontext.mc_fpstate);
-    asm ("fldcw %0" : : "m" (ex->en_cw));
+    struct envxmm *ex = (struct envxmm *)(context->uc_mcontext.mc_fpstate);
+    __asm__ __volatile__ ("fldcw %0" : : "m" (ex->en_cw));
 #endif
 #if defined(LISP_FEATURE_RESTORE_TLS_SEGMENT_REGISTER_FROM_CONTEXT)
     /* Calling this function here may not be good idea.  Or rename
index 406cf57..dbd601f 100644 (file)
@@ -28,6 +28,9 @@ static inline os_context_t *arch_os_get_context(void **void_context)
 #endif
 
 #if defined LISP_FEATURE_FREEBSD
+#if defined(LISP_FEATURE_RESTORE_TLS_SEGMENT_REGISTER_FROM_CONTEXT)
+void os_restore_tls_segment_register(os_context_t *context);
+#endif
 #define RESTORE_FP_CONTROL_FROM_CONTEXT
 void os_restore_fp_control(os_context_t *context);
 #endif
index 554ff33..c5de8e8 100644 (file)
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <sys/types.h>
 #ifdef _WIN32
   #define WIN32_LEAN_AND_MEAN
   #include <windows.h>
-  #include <stdlib.h>
   #include <shlobj.h>
 #else
   #include <sys/times.h>
@@ -336,8 +336,8 @@ main(int argc, char *argv[])
     printf("\n");
 
     printf(";;; signals\n");
-    defconstant("sig-dfl", SIG_DFL);
-    defconstant("sig-ign", SIG_IGN);
+    defconstant("sig-dfl", (unsigned long)SIG_DFL);
+    defconstant("sig-ign", (unsigned long)SIG_IGN);
 
     defsignal("sigalrm", SIGALRM);
     defsignal("sigbus", SIGBUS);
index 73401d5..0701a42 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.10"
+"1.0.10.1"