Search
lxdream.org :: lxdream :: r1025:f32183d273fb
lxdream 0.9.1
released Jun 29
Download Now
changeset1025:f32183d273fb
parent1024:c67f2d61ab97
child1026:a0aa3c503103
authornkeynes
dateSat Jun 13 07:03:51 2009 +0000 (11 years ago)
Fix signedness warnings
src/drivers/cd_linux.c
src/gdbserver.c
src/gdrom/gddriver.h
1.1 --- a/src/drivers/cd_linux.c Sat Jun 13 00:50:48 2009 +0000
1.2 +++ b/src/drivers/cd_linux.c Sat Jun 13 07:03:51 2009 +0000
1.3 @@ -33,9 +33,9 @@
1.4
1.5 static gboolean linux_is_cdrom_device( FILE *f );
1.6 static gdrom_disc_t linux_open_device( const gchar *filename, FILE *f );
1.7 -static gdrom_error_t linux_packet_read( gdrom_disc_t disc, unsigned char *cmd,
1.8 +static gdrom_error_t linux_packet_read( gdrom_disc_t disc, char *cmd,
1.9 unsigned char *buf, uint32_t *buflen );
1.10 -static gdrom_error_t linux_packet_cmd( gdrom_disc_t disc, unsigned char *cmd );
1.11 +static gdrom_error_t linux_packet_cmd( gdrom_disc_t disc, char *cmd );
1.12 static gboolean linux_media_changed( gdrom_disc_t disc );
1.13
1.14
1.15 @@ -119,7 +119,7 @@
1.16 * @return 0 on success, -1 on an operating system error, or a sense error
1.17 * code on a device error.
1.18 */
1.19 -static gdrom_error_t linux_packet_read( gdrom_disc_t disc, unsigned char *cmd,
1.20 +static gdrom_error_t linux_packet_read( gdrom_disc_t disc, char *cmd,
1.21 unsigned char *buffer, uint32_t *buflen )
1.22 {
1.23 int fd = fileno(disc->file);
1.24 @@ -147,7 +147,7 @@
1.25 }
1.26 }
1.27
1.28 -static gdrom_error_t linux_packet_cmd( gdrom_disc_t disc, unsigned char *cmd )
1.29 +static gdrom_error_t linux_packet_cmd( gdrom_disc_t disc, char *cmd )
1.30 {
1.31 int fd = fileno(disc->file);
1.32 struct request_sense sense;
2.1 --- a/src/gdbserver.c Sat Jun 13 00:50:48 2009 +0000
2.2 +++ b/src/gdbserver.c Sat Jun 13 07:03:51 2009 +0000
2.3 @@ -104,7 +104,7 @@
2.4 /**
2.5 * Parse bulk hex data - buffer should be at least datalen/2 bytes long
2.6 */
2.7 -size_t gdb_read_hex_data( struct gdb_server *server, unsigned char *buf, unsigned char *data, int datalen )
2.8 +size_t gdb_read_hex_data( struct gdb_server *server, unsigned char *buf, char *data, int datalen )
2.9 {
2.10 char *p = data;
2.11 for( int i=0; i<datalen/2; i++ ) {
2.12 @@ -120,7 +120,7 @@
2.13 * Parse bulk binary-encoded data - $, #, 0x7D are encoded as 0x7d, char ^ 0x20.
2.14 * Buffer should be at least datalen bytes longs.
2.15 */
2.16 -size_t gdb_read_binary_data( struct gdb_server *server, unsigned char *buf, unsigned char *data, int datalen )
2.17 +size_t gdb_read_binary_data( struct gdb_server *server, unsigned char *buf, char *data, int datalen )
2.18 {
2.19 unsigned char *q = buf;
2.20 for( int i=0, j=0; i<datalen; i++ ) {
2.21 @@ -245,7 +245,7 @@
2.22 gdb_send_error( server, GDB_ERROR_FORMAT );
2.23 } else {
2.24 size_t datalen;
2.25 - char mem[tmp2];
2.26 + unsigned char mem[tmp2];
2.27 if( server->mmu ) {
2.28 datalen = server->cpu->read_mem_vma(mem, tmp, tmp2);
2.29 } else {
2.30 @@ -264,7 +264,7 @@
2.31 gdb_send_error( server, GDB_ERROR_FORMAT );
2.32 } else {
2.33 size_t len;
2.34 - char mem[tmp2];
2.35 + unsigned char mem[tmp2];
2.36 len = gdb_read_hex_data( server, mem, data+tmp3, length-tmp3 );
2.37 if( len != tmp2 ) {
2.38 gdb_send_error( server, GDB_ERROR_FORMAT );
2.39 @@ -347,7 +347,7 @@
2.40 if( sscanf( data, "%x,%x:%n", &tmp, &tmp2, &tmp3 ) != 2 ) {
2.41 gdb_send_error( server, GDB_ERROR_FORMAT );
2.42 } else {
2.43 - char mem[length - tmp3];
2.44 + unsigned char mem[length - tmp3];
2.45 size_t len = gdb_read_binary_data( server, mem, data + tmp3, length-tmp3 );
2.46 if( len != tmp2 ) {
2.47 gdb_send_error( server, GDB_ERROR_FORMAT );
3.1 --- a/src/gdrom/gddriver.h Sat Jun 13 00:50:48 2009 +0000
3.2 +++ b/src/gdrom/gddriver.h Sat Jun 13 07:03:51 2009 +0000
3.3 @@ -170,7 +170,7 @@
3.4 * @return PKT_ERR_OK on success, otherwise the host error code.
3.5 */
3.6 gdrom_error_t (*packet_read)( struct gdrom_disc *disc,
3.7 - unsigned char *cmd, unsigned char *buf,
3.8 + char *cmd, unsigned char *buf,
3.9 unsigned int *length );
3.10
3.11 /* Execute a generic command that does not write or return any data.
3.12 @@ -180,7 +180,7 @@
3.13 * @return PKT_ERR_OK on success, otherwise the host error code.
3.14 */
3.15 gdrom_error_t (*packet_cmd)( struct gdrom_disc *disc,
3.16 - unsigned char *cmd );
3.17 + char *cmd );
3.18
3.19 /* Return TRUE if the media has changed since the last call, otherwise
3.20 * FALSE. This method is used to implement the disc-level check_status
3.21 @@ -253,4 +253,9 @@
3.22 */
3.23 gboolean gdrom_disc_read_title( gdrom_disc_t disc );
3.24
3.25 +/**
3.26 + * Parse a TOC mode-2 result buffer into the gdrom_disc_t data structure
3.27 + */
3.28 +void mmc_parse_toc2( gdrom_disc_t disc, unsigned char *buf );
3.29 +
3.30 #endif /* !lxdream_gddriver_H */
.