# HG changeset patch # User nkeynes # Date 1216600633 0 # Node ID 99ae000d4e09dc61473c9c87b2e73e9f4ae400b4 # Parent 2780bc393e7c5f0b799950eab4bca0bb280171fb Fix compiler warnings --- a/src/cocoaui/cocoa_gd.c Mon Jul 21 00:16:09 2008 +0000 +++ b/src/cocoaui/cocoa_gd.c Mon Jul 21 00:37:13 2008 +0000 @@ -55,7 +55,7 @@ cocoa_gdrom_menu_build( menu ); } -void cocoa_gdrom_menu_update( gboolean list_changed, int selection, void *user_data ) +gboolean cocoa_gdrom_menu_update( gboolean list_changed, int selection, void *user_data ) { // Create an auto-release pool - we may be called outside of the GUI main loop NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @@ -74,6 +74,7 @@ } } [pool release]; + return TRUE; } NSMenu *cocoa_gdrom_menu_new() --- a/src/drivers/gl_fbo.c Mon Jul 21 00:16:09 2008 +0000 +++ b/src/drivers/gl_fbo.c Mon Jul 21 00:37:13 2008 +0000 @@ -201,11 +201,13 @@ static render_buffer_t gl_fbo_create_render_buffer( uint32_t width, uint32_t height ) { + GLuint tex; render_buffer_t buffer = calloc( sizeof(struct render_buffer), 1 ); buffer->width = width; buffer->height = height; - glGenTextures( 1, &buffer->buf_id ); - glBindTexture( GL_TEXTURE_RECTANGLE_ARB, buffer->buf_id ); + glGenTextures( 1, &tex ); + buffer->buf_id = tex; + glBindTexture( GL_TEXTURE_RECTANGLE_ARB, tex ); glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP ); glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP ); glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); @@ -217,6 +219,7 @@ static void gl_fbo_destroy_render_buffer( render_buffer_t buffer ) { int i,j; + GLuint tex = buffer->buf_id; for( i=0; ibuf_id ) { @@ -228,7 +231,7 @@ } } - glDeleteTextures( 1, &buffer->buf_id ); + glDeleteTextures( 1, &tex ); buffer->buf_id = 0; free( buffer ); } --- a/src/drivers/osx_iokit.c Mon Jul 21 00:16:09 2008 +0000 +++ b/src/drivers/osx_iokit.c Mon Jul 21 00:37:13 2008 +0000 @@ -19,15 +19,19 @@ * GNU General Public License for more details. */ +#include #include #include #include #include #include +#include #include #include #include "osx_iokit.h" + + static IONotificationPortRef notify_port = 0; static io_iterator_t iokit_iterators[4] = {0,0,0,0}; @@ -315,7 +319,7 @@ { notify_port = IONotificationPortCreate( kIOMasterPortDefault ); CFRunLoopSourceRef runloop_source = IONotificationPortGetRunLoopSource( notify_port ); - CFRunLoopAddSource( CFRunLoopGetMain(), runloop_source, kCFRunLoopCommonModes ); + CFRunLoopAddSource( CFRunLoopGetCurrent(), runloop_source, kCFRunLoopCommonModes ); // Drive notifications if( IOServiceAddMatchingNotification( notify_port, kIOFirstPublishNotification, @@ -342,7 +346,7 @@ void osx_unregister_iokit_notifications() { CFRunLoopSourceRef runloop_source = IONotificationPortGetRunLoopSource( notify_port ); - CFRunLoopRemoveSource( CFRunLoopGetMain(), runloop_source, kCFRunLoopCommonModes ); + CFRunLoopRemoveSource( CFRunLoopGetCurrent(), runloop_source, kCFRunLoopCommonModes ); IONotificationPortDestroy( notify_port ); notify_port = 0; } --- a/src/sh4/sh4core.in Mon Jul 21 00:16:09 2008 +0000 +++ b/src/sh4/sh4core.in Mon Jul 21 00:37:13 2008 +0000 @@ -1158,7 +1158,7 @@ FSCA FPUL, FRn {: CHECKFPUEN(); if( !IS_FPU_DOUBLEPREC() ) { - sh4_fsca( FPULi, &(DRF(FRn>>1)) ); + sh4_fsca( FPULi, (float *)&(DRF(FRn>>1)) ); /* float angle = (((float)(FPULi&0xFFFF))/65536.0) * 2 * M_PI; FR(FRn) = sinf(angle); @@ -1169,7 +1169,7 @@ FTRV XMTRX, FVn {: CHECKFPUEN(); if( !IS_FPU_DOUBLEPREC() ) { - sh4_ftrv(&(DRF(FVn<<1)) ); + sh4_ftrv((float *)&(DRF(FVn<<1)) ); } :} UNDEF {: