Search
lxdream.org :: lxdream :: r788:eb238a77f3c0
lxdream 0.9.1
released Jun 29
Download Now
changeset788:eb238a77f3c0
parent787:6717c02ff81f
child789:7e7ec23217fc
authornkeynes
dateTue Jul 29 23:25:03 2008 +0000 (11 years ago)
Fix minor warnings
src/drivers/cd_linux.c
src/gdrom/mmc.c
src/sh4/xltcache.c
1.1 --- a/src/drivers/cd_linux.c Tue Jul 29 10:55:51 2008 +0000
1.2 +++ b/src/drivers/cd_linux.c Tue Jul 29 23:25:03 2008 +0000
1.3 @@ -53,7 +53,7 @@
1.4 static gdrom_error_t linux_identify_drive( int fd, unsigned char *buf, int buflen );
1.5 static gdrom_error_t linux_read_sector( gdrom_disc_t disc, uint32_t sector,
1.6 int mode, unsigned char *buf, uint32_t *length );
1.7 -static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, size_t *buflen,
1.8 +static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, uint32_t *buflen,
1.9 int direction );
1.10 static int linux_drive_status( gdrom_disc_t disc );
1.11
1.12 @@ -163,7 +163,7 @@
1.13 {
1.14 int fd = fileno(disc->file);
1.15 unsigned char buf[MAXTOCSIZE];
1.16 - size_t buflen = sizeof(buf);
1.17 + uint32_t buflen = sizeof(buf);
1.18 char cmd[12] = { 0x43, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
1.19
1.20 cmd[7] = (sizeof(buf))>>8;
1.21 @@ -206,7 +206,7 @@
1.22
1.23 static unsigned char *trim( unsigned char *src )
1.24 {
1.25 - char *p = src + strlen(src)-1;
1.26 + unsigned char *p = src + strlen(src)-1;
1.27 while( isspace(*src) )
1.28 src++;
1.29 while( p >= src && isspace(*p) )
1.30 @@ -258,7 +258,7 @@
1.31 * @return 0 on success, -1 on an operating system error, or a sense error
1.32 * code on a device error.
1.33 */
1.34 -static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, size_t *buflen,
1.35 +static gdrom_error_t linux_send_command( int fd, char *cmd, unsigned char *buffer, uint32_t *buflen,
1.36 int direction )
1.37 {
1.38 struct request_sense sense;
2.1 --- a/src/gdrom/mmc.c Tue Jul 29 10:55:51 2008 +0000
2.2 +++ b/src/gdrom/mmc.c Tue Jul 29 23:25:03 2008 +0000
2.3 @@ -101,4 +101,4 @@
2.4 if( leadout != -1 && last_track != -1 ) {
2.5 disc->track[last_track].sector_count = leadout - disc->track[last_track].lba;
2.6 }
2.7 -}
2.8 \ No newline at end of file
2.9 +}
3.1 --- a/src/sh4/xltcache.c Tue Jul 29 10:55:51 2008 +0000
3.2 +++ b/src/sh4/xltcache.c Tue Jul 29 23:25:03 2008 +0000
3.3 @@ -300,7 +300,7 @@
3.4 */
3.5 static void xlat_promote_to_old_space( xlat_cache_block_t block )
3.6 {
3.7 - int allocation = -sizeof(struct xlat_cache_block);
3.8 + int allocation = (int)-sizeof(struct xlat_cache_block);
3.9 int size = block->size;
3.10 xlat_cache_block_t curr = xlat_old_cache_ptr;
3.11 xlat_cache_block_t start_block = curr;
3.12 @@ -316,7 +316,7 @@
3.13 */
3.14 start_block->active = 0;
3.15 start_block->size = allocation;
3.16 - allocation = -sizeof(struct xlat_cache_block);
3.17 + allocation = (int)-sizeof(struct xlat_cache_block);
3.18 start_block = curr = xlat_old_cache;
3.19 }
3.20 } while(1);
3.21 @@ -340,7 +340,7 @@
3.22 void xlat_promote_to_temp_space( xlat_cache_block_t block )
3.23 {
3.24 int size = block->size;
3.25 - int allocation = -sizeof(struct xlat_cache_block);
3.26 + int allocation = (int)-sizeof(struct xlat_cache_block);
3.27 xlat_cache_block_t curr = xlat_temp_cache_ptr;
3.28 xlat_cache_block_t start_block = curr;
3.29 do {
3.30 @@ -361,7 +361,7 @@
3.31 */
3.32 start_block->active = 0;
3.33 start_block->size = allocation;
3.34 - allocation = -sizeof(struct xlat_cache_block);
3.35 + allocation = (int)-sizeof(struct xlat_cache_block);
3.36 start_block = curr = xlat_temp_cache;
3.37 }
3.38 } while(1);
3.39 @@ -426,7 +426,7 @@
3.40 int oldsize = xlat_new_create_ptr->size;
3.41 int size = oldsize + MIN_BLOCK_SIZE; /* minimum expansion */
3.42 void **lut_entry = xlat_new_create_ptr->lut_entry;
3.43 - int allocation = -sizeof(struct xlat_cache_block);
3.44 + int allocation = (int)-sizeof(struct xlat_cache_block);
3.45 xlat_new_cache_ptr = xlat_new_cache;
3.46 do {
3.47 if( xlat_new_cache_ptr->active ) {
.