This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gccgo] Fix types to avoid warnings


I committed this patch to the gccgo branch to fix some types to avoid
warnings on platforms I didn't test myself.

Ian

diff -r 5b76abcb0c12 libgo/runtime/mheap.c
--- a/libgo/runtime/mheap.c	Tue Feb 23 22:39:05 2010 -0800
+++ b/libgo/runtime/mheap.c	Thu Feb 25 09:10:18 2010 -0800
@@ -241,7 +241,7 @@
 	MSpan *t;
 
 	if(s->state != MSpanInUse || s->ref != 0) {
-		printf("MHeap_FreeLocked - span %p ptr %zu state %d ref %d\n", s, s->start<<PageShift, s->state, s->ref);
+		printf("MHeap_FreeLocked - span %p ptr %zu state %u ref %u\n", s, (size_t) (s->start<<PageShift), (unsigned int) s->state, (unsigned int) s->ref);
 		throw("MHeap_FreeLocked - invalid free");
 	}
 	s->state = MSpanFree;
diff -r 5b76abcb0c12 libgo/runtime/mheapmap32.c
--- a/libgo/runtime/mheapmap32.c	Tue Feb 23 22:39:05 2010 -0800
+++ b/libgo/runtime/mheapmap32.c	Thu Feb 25 09:10:18 2010 -0800
@@ -12,7 +12,7 @@
 
 // 3-level radix tree mapping page ids to Span*.
 void
-MHeapMap_Init(MHeapMap *m, void *(*allocator)(size_t))
+MHeapMap_Init(MHeapMap *m, void *(*allocator)(uintptr))
 {
 	m->allocator = allocator;
 }
diff -r 5b76abcb0c12 libgo/runtime/mheapmap64.c
--- a/libgo/runtime/mheapmap64.c	Tue Feb 23 22:39:05 2010 -0800
+++ b/libgo/runtime/mheapmap64.c	Thu Feb 25 09:10:18 2010 -0800
@@ -12,7 +12,7 @@
 
 // 3-level radix tree mapping page ids to Span*.
 void
-MHeapMap_Init(MHeapMap *m, void *(*allocator)(size_t))
+MHeapMap_Init(MHeapMap *m, void *(*allocator)(uintptr))
 {
 	m->allocator = allocator;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]