|
[Sbcl-commits] CVS: sbcl/src/runtime GNUmakefile, 1.31,
1.32 backtrace.c, 1.34, 1.35 breakpoint.c, 1.29, 1.30 core.h,
1.10, 1.11 coreparse.c, 1.38, 1.39 gc-common.c, 1.50,
1.51 gencgc-internal.h, 1.18, 1.19 gencgc.c, 1.123,
1.124 print.c, 1.30, 1.31 thread.c, 1.81, 1.82 wrap.c, 1.31,
1.32 x86-arch.h, 1.14, 1.15
From: Nikodemus Siivola <demoss@us...> - 2008-02-19 10:18
|
Update of /cvsroot/sbcl/sbcl/src/runtime
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30057/src/runtime
Modified Files:
GNUmakefile backtrace.c breakpoint.c core.h coreparse.c
gc-common.c gencgc-internal.h gencgc.c print.c thread.c wrap.c
x86-arch.h
Log Message:
1.0.14.38: build runtime with -Wsign-compare, and clean warnings on x86/Linux
* Nothing serious seemed to be going on, though, but since C has nasty
signed vs unsigned comparison semantics, it is better to be clear
about what is going on.
Index: GNUmakefile
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/GNUmakefile,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- GNUmakefile 2 May 2007 17:37:54 -0000 1.31
+++ GNUmakefile 19 Feb 2008 10:18:07 -0000 1.32
@@ -23,7 +23,7 @@
DEPEND_FLAGS = -MM
GREP = grep
-CFLAGS = -g -Wall -O3
+CFLAGS = -g -Wall -Wsign-compare -O3
ASFLAGS = $(CFLAGS)
CPPFLAGS = -I.
Index: backtrace.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/backtrace.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- backtrace.c 4 Oct 2007 22:52:51 -0000 1.34
+++ backtrace.c 19 Feb 2008 10:18:07 -0000 1.35
@@ -408,7 +408,7 @@
if (i == len)
return ((struct compiled_debug_fun *) native_pointer(v->data[i - 1]));
- if (offset >= fixnum_value(df->elsewhere_pc)) {
+ if (offset >= (unsigned long)fixnum_value(df->elsewhere_pc)) {
struct compiled_debug_fun *p
= ((struct compiled_debug_fun *) native_pointer(v->data[i + 1]));
next_pc = fixnum_value(p->elsewhere_pc);
Index: breakpoint.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/breakpoint.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- breakpoint.c 9 Dec 2007 15:04:48 -0000 1.29
+++ breakpoint.c 19 Feb 2008 10:18:07 -0000 1.30
@@ -115,7 +115,7 @@
if (pc < code_start)
return 0;
else {
- long offset = pc - code_start;
+ unsigned long offset = pc - code_start;
if (offset >= codeptr->code_size)
return 0;
else
Index: core.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/core.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- core.h 18 Jun 2007 16:18:34 -0000 1.10
+++ core.h 19 Feb 2008 10:18:07 -0000 1.11
@@ -39,6 +39,6 @@
* against a .core built without :SB-SHOW (or against various grosser
* mismatches, e.g. a .core built with an old version of the code
* against a runtime with patches which add new C code) */
-extern char build_id[];
+extern unsigned char build_id[];
#endif
Index: coreparse.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/coreparse.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- coreparse.c 18 Jun 2007 16:18:34 -0000 1.38
+++ coreparse.c 19 Feb 2008 10:18:07 -0000 1.39
@@ -42,7 +42,7 @@
#endif
-char build_id[] =
+unsigned char build_id[] =
#include "../../output/build-id.tmp"
;
@@ -121,7 +121,7 @@
os_vm_address_t addr =
(os_vm_address_t) (os_vm_page_size * entry->address);
lispobj *free_pointer = (lispobj *) addr + entry->nwords;
- long len = os_vm_page_size * entry->page_count;
+ unsigned long len = os_vm_page_size * entry->page_count;
if (len != 0) {
os_vm_address_t real_addr;
@@ -199,7 +199,8 @@
load_core_file(char *file, os_vm_offset_t file_offset)
{
lispobj *header, val, len, *ptr, remaining_len;
- int fd = open_binary(file, O_RDONLY), count;
+ int fd = open_binary(file, O_RDONLY);
+ unsigned int count;
lispobj initial_function = NIL;
FSHOW((stderr, "/entering load_core_file(%s)\n", file));
@@ -253,7 +254,7 @@
case BUILD_ID_CORE_ENTRY_TYPE_CODE:
SHOW("BUILD_ID_CORE_ENTRY_TYPE_CODE case");
{
- int i;
+ unsigned int i;
FSHOW((stderr, "build_id[]=\"%s\"\n", build_id));
FSHOW((stderr, "remaining_len = %d\n", remaining_len));
Index: gc-common.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/gc-common.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- gc-common.c 9 Dec 2007 15:04:48 -0000 1.50
+++ gc-common.c 19 Feb 2008 10:18:07 -0000 1.51
@@ -1638,7 +1638,7 @@
unsigned long hash_vector_length;
lispobj empty_symbol;
lispobj weakness = hash_table->weakness;
- long i;
+ unsigned long i;
kv_vector = get_array_data(hash_table->table,
SIMPLE_VECTOR_WIDETAG, &kv_length);
@@ -1827,7 +1827,7 @@
lispobj *hash_vector;
lispobj empty_symbol;
lispobj weakness = hash_table->weakness;
- long i;
+ unsigned long i;
kv_vector = get_array_data(hash_table->table,
SIMPLE_VECTOR_WIDETAG, NULL);
@@ -1903,7 +1903,7 @@
void
gc_init_tables(void)
{
- long i;
+ unsigned long i;
/* Set default value in all slots of scavenge table. FIXME
* replace this gnarly sizeof with something based on
Index: gencgc-internal.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/gencgc-internal.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- gencgc-internal.h 15 Jan 2007 22:15:49 -0000 1.18
+++ gencgc-internal.h 19 Feb 2008 10:18:08 -0000 1.19
@@ -93,7 +93,7 @@
/* values for the page.allocated field */
-extern unsigned page_table_pages;
+extern page_index_t page_table_pages;
extern struct page *page_table;
Index: gencgc.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/gencgc.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- gencgc.c 9 Dec 2007 15:04:48 -0000 1.123
+++ gencgc.c 19 Feb 2008 10:18:08 -0000 1.124
@@ -80,7 +80,7 @@
boolean enable_page_protection = 1;
/* the minimum size (in bytes) for a large object*/
-unsigned long large_object_size = 4 * PAGE_BYTES;
+long large_object_size = 4 * PAGE_BYTES;
/*
@@ -163,7 +163,7 @@
/* An array of page structures is allocated on gc initialization.
* This helps quickly map between an address its page structure.
* page_table_pages is set from the size of the dynamic space. */
-unsigned page_table_pages;
+page_index_t page_table_pages;
struct page *page_table;
/* To map addresses to page structures the address of the first page
@@ -1188,7 +1188,7 @@
{
void *new_free_pointer;
- if(nbytes>=large_object_size)
+ if (nbytes>=large_object_size)
return gc_alloc_large(nbytes,unboxed_p,my_region);
/* Check whether there is room in the current alloc region. */
Index: print.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/print.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- print.c 28 Jul 2007 18:42:00 -0000 1.30
+++ print.c 19 Feb 2008 10:18:08 -0000 1.31
@@ -237,7 +237,8 @@
static void brief_otherimm(lispobj obj)
{
- int type, c, idx;
+ int type, c;
+ unsigned int idx;
char buffer[10];
type = widetag_of(obj);
@@ -288,7 +289,9 @@
static void print_otherimm(lispobj obj)
{
- int type, idx;
+ int type;
+
+ unsigned int idx;
type = widetag_of(obj);
idx = type >> 2;
@@ -379,7 +382,7 @@
static void print_struct(lispobj obj)
{
struct instance *instance = (struct instance *)native_pointer(obj);
- int i;
+ unsigned int i;
char buffer[16];
print_obj("type: ", ((struct instance *)native_pointer(obj))->slots[0]);
for (i = 1; i < HeaderValue(instance->header); i++) {
Index: thread.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/thread.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- thread.c 20 Oct 2007 06:27:20 -0000 1.81
+++ thread.c 19 Feb 2008 10:18:08 -0000 1.82
@@ -364,7 +364,7 @@
void *spaces=0;
void *aligned_spaces=0;
#ifdef LISP_FEATURE_SB_THREAD
- int i;
+ unsigned int i;
#endif
/* May as well allocate all the spaces at once: it saves us from
Index: wrap.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/wrap.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- wrap.c 22 Jan 2008 17:14:31 -0000 1.31
+++ wrap.c 19 Feb 2008 10:18:08 -0000 1.32
@@ -359,7 +359,7 @@
} else {
char *result = malloc(len + 2);
if (result) {
- int nchars = sprintf(result,"%s/",p->pw_dir);
+ unsigned int nchars = sprintf(result,"%s/",p->pw_dir);
if (nchars == len + 1) {
return result;
} else {
Index: x86-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/x86-arch.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- x86-arch.h 18 Jun 2007 16:18:36 -0000 1.14
+++ x86-arch.h 19 Feb 2008 10:18:08 -0000 1.15
@@ -21,7 +21,7 @@
#include "interr.h"
static inline void
-get_spinlock(volatile lispobj *word,long value)
+get_spinlock(volatile lispobj *word, unsigned long value)
{
#ifdef LISP_FEATURE_SB_THREAD
u32 eax=0;
|
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] CVS: sbcl/src/runtime GNUmakefile, 1.31, 1.32 backtrace.c, 1.34, 1.35 breakpoint.c, 1.29, 1.30 core.h, 1.10, 1.11 coreparse.c, 1.38, 1.39 gc-common.c, 1.50, 1.51 gencgc-internal.h, 1.18, 1.19 gencgc.c, 1.123, 1.124 print.c, 1.30, 1.31 thread.c, 1.81, 1.82 wrap.c, 1.31, 1.32 x86-arch.h, 1.14, 1.15 | Nikodemus Siivola <demoss@us...> |