Search
lxdream.org :: lxdream :: r1071:182cfe43c09e
lxdream 0.9.1
released Jun 29
Download Now
changeset1071:182cfe43c09e
parent1070:f543ee84dceb
child1072:d82e04e6d497
authornkeynes
dateTue Jul 21 20:21:52 2009 +1000 (11 years ago)
Fix assorted -Wall warnings
src/drivers/cd_mmc.c
src/drivers/net_osx.m
src/gdbserver.c
src/gdrom/gdimage.c
src/plugin.c
src/sh4/sh4.c
src/vmu/vmulist.c
src/vmu/vmuvol.c
src/xlat/x86/x86op.h
1.1 --- a/src/drivers/cd_mmc.c Thu Jul 09 08:51:18 2009 +1000
1.2 +++ b/src/drivers/cd_mmc.c Tue Jul 21 20:21:52 2009 +1000
1.3 @@ -175,7 +175,7 @@
1.4 if( status == PKT_ERR_OK ) {
1.5 mmc_parse_toc2( disc, buf );
1.6 } else {
1.7 - if( status & 0xFF != 0x02 ) {
1.8 + if( (status & 0xFF) != 0x02 ) {
1.9 /* Sense key 2 == Not Ready (ie temporary failure). Just ignore and
1.10 * consider the drive empty for now, but warn about any other errors
1.11 * we get. */
1.12 @@ -239,4 +239,4 @@
1.13 gdrom_scsi_read_toc(disc);
1.14 }
1.15 return disc;
1.16 -}
1.17 \ No newline at end of file
1.18 +}
2.1 --- a/src/drivers/net_osx.m Thu Jul 09 08:51:18 2009 +1000
2.2 +++ b/src/drivers/net_osx.m Tue Jul 21 20:21:52 2009 +1000
2.3 @@ -73,4 +73,6 @@
2.4 net_osx_callback, &socketContext );
2.5 cbinfo->sourceRef = CFSocketCreateRunLoopSource( kCFAllocatorDefault, cbinfo->sockRef, 0 );
2.6 CFRunLoopAddSource( CFRunLoopGetCurrent(), cbinfo->sourceRef, kCFRunLoopCommonModes );
2.7 +
2.8 + return TRUE;
2.9 }
3.1 --- a/src/gdbserver.c Thu Jul 09 08:51:18 2009 +1000
3.2 +++ b/src/gdbserver.c Tue Jul 21 20:21:52 2009 +1000
3.3 @@ -523,6 +523,7 @@
3.4 server->cpu = cpu;
3.5 server->mmu = mmu;
3.6 server->fd = fd;
3.7 - net_register_tcp_listener( fd, gdb_server_connect_callback, server, gdb_server_free );
3.8 - INFO( "%s GDB server running on port %d", cpu->name, port );
3.9 + gboolean result = net_register_tcp_listener( fd, gdb_server_connect_callback, server, gdb_server_free );
3.10 + INFO( "%s GDB server running on port %d", cpu->name, port );
3.11 + return result;
3.12 }
4.1 --- a/src/gdrom/gdimage.c Thu Jul 09 08:51:18 2009 +1000
4.2 +++ b/src/gdrom/gdimage.c Tue Jul 21 20:21:52 2009 +1000
4.3 @@ -114,6 +114,7 @@
4.4 disc->play_audio = NULL; /* not supported yet */
4.5 disc->run_time_slice = NULL; /* not needed */
4.6 }
4.7 + return disc;
4.8 }
4.9
4.10
5.1 --- a/src/plugin.c Thu Jul 09 08:51:18 2009 +1000
5.2 +++ b/src/plugin.c Tue Jul 21 20:21:52 2009 +1000
5.3 @@ -123,7 +123,7 @@
5.4 */
5.5 static int plugin_load_all( const gchar *plugin_dir )
5.6 {
5.7 - int plugin_count;
5.8 + int plugin_count = 0;
5.9 struct dirent *ent;
5.10
5.11 DIR *dir = opendir(plugin_dir);
6.1 --- a/src/sh4/sh4.c Thu Jul 09 08:51:18 2009 +1000
6.2 +++ b/src/sh4/sh4.c Tue Jul 21 20:21:52 2009 +1000
6.3 @@ -707,6 +707,7 @@
6.4 read_len += next_len;
6.5 length -= next_len;
6.6 }
6.7 + return read_len;
6.8 } else {
6.9 return sh4_debug_write_phys( addr, buf, length );
6.10 }
7.1 --- a/src/vmu/vmulist.c Thu Jul 09 08:51:18 2009 +1000
7.2 +++ b/src/vmu/vmulist.c Tue Jul 21 20:21:52 2009 +1000
7.3 @@ -131,6 +131,9 @@
7.4 entry->filename = g_strdup(filename);
7.5 entry->vol = vol;
7.6 vmu_list = g_list_insert_sorted(vmu_list, entry, vmulist_display_name_compare );
7.7 + vmulist_update_config();
7.8 +
7.9 + CALL_HOOKS( vmulist_change_hook, VMU_ADDED, g_list_index(vmu_list,entry) );
7.10 } else {
7.11 if( entry->vol != vol && entry->vol != NULL )
7.12 vmu_volume_destroy( entry->vol );
7.13 @@ -141,8 +144,6 @@
7.14 }
7.15 entry->attach_count = 0;
7.16
7.17 - vmulist_update_config();
7.18 - CALL_HOOKS( vmulist_change_hook, VMU_ADDED, g_list_index(vmu_list,entry) );
7.19 return entry;
7.20 }
7.21
8.1 --- a/src/vmu/vmuvol.c Thu Jul 09 08:51:18 2009 +1000
8.2 +++ b/src/vmu/vmuvol.c Tue Jul 21 20:21:52 2009 +1000
8.3 @@ -82,7 +82,7 @@
8.4 #define FAT_EMPTY 0xFFFC
8.5 #define FAT_EOF 0xFFFA
8.6
8.7 -static const struct vmu_volume_metadata default_metadata = { 255, 255, 254, 1, 253, 13, 0, 200, 31, 0, 128 };
8.8 +static const struct vmu_volume_metadata default_metadata = { 255, 255, 254, 1, 253, 13, 0, 200, {31, 0, 128} };
8.9
8.10 vmu_volume_t vmu_volume_new_default( const gchar *display_name )
8.11 {
8.12 @@ -374,6 +374,7 @@
8.13 }
8.14 memcpy( VMU_BLOCK(vol,pt,block), in, VMU_BLOCK_SIZE );
8.15 vol->dirty = TRUE;
8.16 + return TRUE;
8.17 }
8.18
8.19 gboolean vmu_volume_write_phase( vmu_volume_t vol, vmu_partnum_t pt, unsigned int block, unsigned int phase, unsigned char *in )
8.20 @@ -383,6 +384,7 @@
8.21 }
8.22 memcpy( VMU_BLOCK(vol,pt,block) + (phase*128), in, VMU_BLOCK_SIZE/4 );
8.23 vol->dirty = TRUE;
8.24 + return TRUE;
8.25 }
8.26
8.27 const struct vmu_volume_metadata *vmu_volume_get_metadata( vmu_volume_t vol, vmu_partnum_t partition )
9.1 --- a/src/xlat/x86/x86op.h Thu Jul 09 08:51:18 2009 +1000
9.2 +++ b/src/xlat/x86/x86op.h Tue Jul 21 20:21:52 2009 +1000
9.3 @@ -146,7 +146,7 @@
9.4 #define OPPTR(x) *((void **)xlat_output) = ((void *)x); xlat_output+=(sizeof(void*))
9.5
9.6 /* Primary opcode emitter, eg OPCODE(0x0FBE) for MOVSX */
9.7 -#define OPCODE(x) if( (x) > 0xFFFF ) { OP(x>>16); OP((x>>8)&0xFF); OP(x&0xFF); } else if( (x) > 0xFF ) { OP(x>>8); OP(x&0xFF); } else { OP(x); }
9.8 +#define OPCODE(x) if( (x) > 0xFFFF ) { OP((x)>>16); OP(((x)>>8)&0xFF); OP((x)&0xFF); } else if( (x) > 0xFF ) { OP((x)>>8); OP((x)&0xFF); } else { OP(x); }
9.9
9.10 /* Test if immediate value is representable as a signed 8-bit integer */
9.11 #define IS_INT8(imm) ((imm) >= INT8_MIN && (imm) <= INT8_MAX)
9.12 @@ -174,7 +174,7 @@
9.13 * @param rr reg field
9.14 * @param rb r/m field
9.15 */
9.16 -static int x86_encode_reg_rm( int rexw, uint32_t opcode, int rr, int rb )
9.17 +static void x86_encode_reg_rm( int rexw, uint32_t opcode, int rr, int rb )
9.18 {
9.19 int rex = rexw;
9.20 rr &= 0x0F;
.