Search
lxdream.org :: lxdream :: r986:5090104b0963
lxdream 0.9.1
released Jun 29
Download Now
changeset986:5090104b0963
parent985:52e64faac752
child987:3bd03f1ce0a7
authornkeynes
dateTue Feb 24 11:50:17 2009 +0000 (11 years ago)
Fix minor warnings
Add explicit casts to mmap() result for platforms where it's not void *...
src/gtkui/gtk_win.c
src/mem.c
src/sh4/sh4core.h
src/sh4/sh4core.in
src/sh4/xltcache.c
1.1 --- a/src/gtkui/gtk_win.c Tue Feb 24 11:47:41 2009 +0000
1.2 +++ b/src/gtkui/gtk_win.c Tue Feb 24 11:50:17 2009 +0000
1.3 @@ -25,10 +25,11 @@
1.4 #include <stdio.h>
1.5 #include <stdlib.h>
1.6
1.7 +#include <X11/Xlib.h>
1.8 +#include <X11/Xutil.h>
1.9 #include <gtk/gtk.h>
1.10 #include <gdk/gdk.h>
1.11 #include <gdk/gdkkeysyms.h>
1.12 -#include <X11/Xutil.h>
1.13
1.14 #include "lxdream.h"
1.15 #include "dreamcast.h"
2.1 --- a/src/mem.c Tue Feb 24 11:47:41 2009 +0000
2.2 +++ b/src/mem.c Tue Feb 24 11:50:17 2009 +0000
2.3 @@ -118,14 +118,14 @@
2.4 {
2.5 int i;
2.6 mem_region_fn_t *ptr;
2.7 - page_map = mmap( NULL, sizeof(sh4ptr_t) * LXDREAM_PAGE_TABLE_ENTRIES,
2.8 + page_map = (sh4ptr_t *)mmap( NULL, sizeof(sh4ptr_t) * LXDREAM_PAGE_TABLE_ENTRIES,
2.9 PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0 );
2.10 if( page_map == MAP_FAILED ) {
2.11 FATAL( "Unable to allocate page map! (%s)", strerror(errno) );
2.12 }
2.13 memset( page_map, 0, sizeof(sh4ptr_t) * LXDREAM_PAGE_TABLE_ENTRIES );
2.14
2.15 - ext_address_space = mmap( NULL, sizeof(mem_region_fn_t) * LXDREAM_PAGE_TABLE_ENTRIES,
2.16 + ext_address_space = (mem_region_fn_t *) mmap( NULL, sizeof(mem_region_fn_t) * LXDREAM_PAGE_TABLE_ENTRIES,
2.17 PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0 );
2.18 if( ext_address_space == MAP_FAILED ) {
2.19 FATAL( "Unable to allocate external memory map (%s)", strerror(errno) );
3.1 --- a/src/sh4/sh4core.h Tue Feb 24 11:47:41 2009 +0000
3.2 +++ b/src/sh4/sh4core.h Tue Feb 24 11:50:17 2009 +0000
3.3 @@ -154,6 +154,7 @@
3.4 void MMU_save_state( FILE *f );
3.5 int MMU_load_state( FILE *f );
3.6 void MMU_ldtlb();
3.7 +void CCN_reset();
3.8 void CCN_set_cache_control( int reg );
3.9 void CCN_save_state( FILE *f );
3.10 int CCN_load_state( FILE *f );
4.1 --- a/src/sh4/sh4core.in Tue Feb 24 11:47:41 2009 +0000
4.2 +++ b/src/sh4/sh4core.in Tue Feb 24 11:50:17 2009 +0000
4.3 @@ -339,8 +339,8 @@
4.4 sh4r.slice_cycle += sh4_cpu_period;
4.5 }
4.6
4.7 -#undef UNDEF(ir)
4.8 -#undef UNIMP(ir)
4.9 +#undef UNDEF
4.10 +#undef UNIMP
4.11
4.12 #define UNDEF(ir) return sh4_raise_slot_exception(EXC_ILLEGAL, EXC_SLOT_ILLEGAL)
4.13 #define UNIMP(ir) do{ ERROR( "Halted on unimplemented instruction at %08x, opcode = %04x", sh4r.pc, ir ); sh4_core_exit(CORE_EXIT_HALT); return FALSE; }while(0)
5.1 --- a/src/sh4/xltcache.c Tue Feb 24 11:47:41 2009 +0000
5.2 +++ b/src/sh4/xltcache.c Tue Feb 24 11:50:17 2009 +0000
5.3 @@ -66,7 +66,7 @@
5.4 {
5.5 if( !xlat_initialized ) {
5.6 xlat_initialized = TRUE;
5.7 - xlat_new_cache = mmap( NULL, XLAT_NEW_CACHE_SIZE, PROT_EXEC|PROT_READ|PROT_WRITE,
5.8 + xlat_new_cache = (xlat_cache_block_t)mmap( NULL, XLAT_NEW_CACHE_SIZE, PROT_EXEC|PROT_READ|PROT_WRITE,
5.9 MAP_PRIVATE|MAP_ANON, -1, 0 );
5.10 xlat_new_cache_ptr = xlat_new_cache;
5.11 xlat_new_create_ptr = xlat_new_cache;
5.12 @@ -227,7 +227,7 @@
5.13 /* Add the LUT entry for the block */
5.14 if( page == NULL ) {
5.15 xlat_lut[XLAT_LUT_PAGE(address)] = page =
5.16 - mmap( NULL, XLAT_LUT_PAGE_SIZE, PROT_READ|PROT_WRITE,
5.17 + (void **)mmap( NULL, XLAT_LUT_PAGE_SIZE, PROT_READ|PROT_WRITE,
5.18 MAP_PRIVATE|MAP_ANON, -1, 0 );
5.19 memset( page, 0, XLAT_LUT_PAGE_SIZE );
5.20 }
5.21 @@ -392,7 +392,7 @@
5.22 /* Add the LUT entry for the block */
5.23 if( xlat_lut[XLAT_LUT_PAGE(address)] == NULL ) {
5.24 xlat_lut[XLAT_LUT_PAGE(address)] =
5.25 - mmap( NULL, XLAT_LUT_PAGE_SIZE, PROT_READ|PROT_WRITE,
5.26 + (void **)mmap( NULL, XLAT_LUT_PAGE_SIZE, PROT_READ|PROT_WRITE,
5.27 MAP_PRIVATE|MAP_ANON, -1, 0 );
5.28 memset( xlat_lut[XLAT_LUT_PAGE(address)], 0, XLAT_LUT_PAGE_SIZE );
5.29 }
.