forked from len0rd/rockbox
fix gcc4 (un)signed warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8124 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5c1f9859e4
commit
76667e2a5b
8 changed files with 20 additions and 20 deletions
|
@ -63,7 +63,7 @@
|
||||||
static long _get_data(OggVorbis_File *vf){
|
static long _get_data(OggVorbis_File *vf){
|
||||||
errno=0;
|
errno=0;
|
||||||
if(vf->datasource){
|
if(vf->datasource){
|
||||||
char *buffer=ogg_sync_bufferin(vf->oy,CHUNKSIZE);
|
char *buffer=(char *)ogg_sync_bufferin(vf->oy,CHUNKSIZE);
|
||||||
long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource);
|
long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource);
|
||||||
if(bytes>0)ogg_sync_wrote(vf->oy,bytes);
|
if(bytes>0)ogg_sync_wrote(vf->oy,bytes);
|
||||||
if(bytes==0 && errno)return(-1);
|
if(bytes==0 && errno)return(-1);
|
||||||
|
@ -682,7 +682,7 @@ static int _ov_open1(void *f,OggVorbis_File *vf,char *initial,
|
||||||
previously read data (as we may be reading from a non-seekable
|
previously read data (as we may be reading from a non-seekable
|
||||||
stream) */
|
stream) */
|
||||||
if(initial){
|
if(initial){
|
||||||
char *buffer=ogg_sync_bufferin(vf->oy,ibytes);
|
char *buffer=(char *)ogg_sync_bufferin(vf->oy,ibytes);
|
||||||
memcpy(buffer,initial,ibytes);
|
memcpy(buffer,initial,ibytes);
|
||||||
ogg_sync_wrote(vf->oy,ibytes);
|
ogg_sync_wrote(vf->oy,ibytes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,9 +124,9 @@ enum codec_status codec_start(struct codec_api* api)
|
||||||
|
|
||||||
/* Deal with any pending seek requests */
|
/* Deal with any pending seek requests */
|
||||||
if (ci->seek_time) {
|
if (ci->seek_time) {
|
||||||
if (alac_seek(&demux_res,&input_stream,
|
if (alac_seek(&demux_res, &input_stream,
|
||||||
((ci->seek_time-1)/10) * (ci->id3->frequency/100),
|
((ci->seek_time-1)/10) * (ci->id3->frequency/100),
|
||||||
&samplesdone, &i)) {
|
&samplesdone, (int *)&i)) {
|
||||||
elapsedtime=(samplesdone*10)/(ci->id3->frequency/100);
|
elapsedtime=(samplesdone*10)/(ci->id3->frequency/100);
|
||||||
ci->set_elapsed(elapsedtime);
|
ci->set_elapsed(elapsedtime);
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,9 +101,9 @@ enum codec_status codec_start(struct codec_api* api)
|
||||||
|
|
||||||
/* Deal with any pending seek requests */
|
/* Deal with any pending seek requests */
|
||||||
if (ci->seek_time) {
|
if (ci->seek_time) {
|
||||||
if (alac_seek(&demux_res,&input_stream,
|
if (alac_seek(&demux_res, &input_stream,
|
||||||
((ci->seek_time-1)/10) * (ci->id3->frequency/100),
|
((ci->seek_time-1)/10) * (ci->id3->frequency/100),
|
||||||
&samplesdone, &i)) {
|
&samplesdone, (int *)&i)) {
|
||||||
elapsedtime=(samplesdone*10)/(ci->id3->frequency/100);
|
elapsedtime=(samplesdone*10)/(ci->id3->frequency/100);
|
||||||
ci->set_elapsed(elapsedtime);
|
ci->set_elapsed(elapsedtime);
|
||||||
}
|
}
|
||||||
|
|
|
@ -669,7 +669,7 @@ static int it_read_pattern(IT_PATTERN *pattern, DUMBFILE *f, unsigned char *buff
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Read in the pattern data. */
|
/* Read in the pattern data. */
|
||||||
dumbfile_getnc(buffer, buflen, f);
|
dumbfile_getnc((char *)buffer, buflen, f);
|
||||||
|
|
||||||
if (dumbfile_error(f))
|
if (dumbfile_error(f))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -875,8 +875,8 @@ static sigdata_t *it_load_sigdata(DUMBFILE *f)
|
||||||
/* Skip Pitch Wheel Depth, Message Length, Message Offset and Reserved. */
|
/* Skip Pitch Wheel Depth, Message Length, Message Offset and Reserved. */
|
||||||
dumbfile_skip(f, 11);
|
dumbfile_skip(f, 11);
|
||||||
|
|
||||||
dumbfile_getnc(sigdata->channel_pan, DUMB_IT_N_CHANNELS, f);
|
dumbfile_getnc((char *)sigdata->channel_pan, DUMB_IT_N_CHANNELS, f);
|
||||||
dumbfile_getnc(sigdata->channel_volume, DUMB_IT_N_CHANNELS, f);
|
dumbfile_getnc((char *)sigdata->channel_volume, DUMB_IT_N_CHANNELS, f);
|
||||||
|
|
||||||
if (dumbfile_error(f) || sigdata->n_orders <= 0 || sigdata->n_instruments > 256 || sigdata->n_samples > 256 || sigdata->n_patterns > 256) {
|
if (dumbfile_error(f) || sigdata->n_orders <= 0 || sigdata->n_instruments > 256 || sigdata->n_samples > 256 || sigdata->n_patterns > 256) {
|
||||||
_dumb_it_unload_sigdata(sigdata);
|
_dumb_it_unload_sigdata(sigdata);
|
||||||
|
@ -917,7 +917,7 @@ static sigdata_t *it_load_sigdata(DUMBFILE *f)
|
||||||
sigdata->pattern[n].entry = NULL;
|
sigdata->pattern[n].entry = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dumbfile_getnc(sigdata->order, sigdata->n_orders, f);
|
dumbfile_getnc((char *)sigdata->order, sigdata->n_orders, f);
|
||||||
sigdata->restart_position = 0;
|
sigdata->restart_position = 0;
|
||||||
|
|
||||||
component = malloc(768 * sizeof(*component));
|
component = malloc(768 * sizeof(*component));
|
||||||
|
@ -1000,7 +1000,7 @@ static sigdata_t *it_load_sigdata(DUMBFILE *f)
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
unsigned char len = 0;
|
unsigned char len = 0;
|
||||||
int j, leftdigit = -1;
|
int j, leftdigit = -1;
|
||||||
if (dumbfile_getnc(mididata, 32, f) < 32) {
|
if (dumbfile_getnc((char *)mididata, 32, f) < 32) {
|
||||||
free(component);
|
free(component);
|
||||||
_dumb_it_unload_sigdata(sigdata);
|
_dumb_it_unload_sigdata(sigdata);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1032,7 +1032,7 @@ static sigdata_t *it_load_sigdata(DUMBFILE *f)
|
||||||
for (i = 0; i < 128; i++) {
|
for (i = 0; i < 128; i++) {
|
||||||
unsigned char len = 0;
|
unsigned char len = 0;
|
||||||
int j, leftdigit = -1;
|
int j, leftdigit = -1;
|
||||||
dumbfile_getnc(mididata, 32, f);
|
dumbfile_getnc((char *)mididata, 32, f);
|
||||||
for (j = 0; j < 32; j++) {
|
for (j = 0; j < 32; j++) {
|
||||||
if (leftdigit >= 0) {
|
if (leftdigit >= 0) {
|
||||||
if (mididata[j] == 0) {
|
if (mididata[j] == 0) {
|
||||||
|
|
|
@ -231,8 +231,8 @@ static int it_s3m_read_pattern(IT_PATTERN *pattern, DUMBFILE *f, unsigned char *
|
||||||
b >>= 5;
|
b >>= 5;
|
||||||
pattern->n_entries++;
|
pattern->n_entries++;
|
||||||
if (b) {
|
if (b) {
|
||||||
if (buflen + used[b] >= 65536) return -1;
|
if (buflen + (signed char)used[b] >= 65536) return -1;
|
||||||
dumbfile_getnc(buffer + buflen, used[b], f);
|
dumbfile_getnc((char *)buffer + buflen, used[b], f);
|
||||||
buflen += used[b];
|
buflen += used[b];
|
||||||
} else {
|
} else {
|
||||||
/* End of row */
|
/* End of row */
|
||||||
|
@ -494,7 +494,7 @@ static DUMB_IT_SIGDATA *it_s3m_load_sigdata(DUMBFILE *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Orders, byte each, length = sigdata->n_orders (should be even) */
|
/* Orders, byte each, length = sigdata->n_orders (should be even) */
|
||||||
dumbfile_getnc(sigdata->order, sigdata->n_orders, f);
|
dumbfile_getnc((char *)sigdata->order, sigdata->n_orders, f);
|
||||||
sigdata->restart_position = 0;
|
sigdata->restart_position = 0;
|
||||||
|
|
||||||
component = malloc(768*sizeof(*component));
|
component = malloc(768*sizeof(*component));
|
||||||
|
|
|
@ -79,7 +79,7 @@ int init_wv_bitstream (WavpackContext *wpc, WavpackMetadata *wpmd)
|
||||||
WavpackStream *wps = &wpc->stream;
|
WavpackStream *wps = &wpc->stream;
|
||||||
|
|
||||||
if (wpmd->data)
|
if (wpmd->data)
|
||||||
bs_open_read (&wps->wvbits, wpmd->data, (char *) wpmd->data + wpmd->byte_length, NULL, 0);
|
bs_open_read (&wps->wvbits, wpmd->data, (unsigned char *) wpmd->data + wpmd->byte_length, NULL, 0);
|
||||||
else if (wpmd->byte_length)
|
else if (wpmd->byte_length)
|
||||||
bs_open_read (&wps->wvbits, wpc->read_buffer, wpc->read_buffer + sizeof (wpc->read_buffer),
|
bs_open_read (&wps->wvbits, wpc->read_buffer, wpc->read_buffer + sizeof (wpc->read_buffer),
|
||||||
wpc->infile, wpmd->byte_length + (wpmd->byte_length & 1));
|
wpc->infile, wpmd->byte_length + (wpmd->byte_length & 1));
|
||||||
|
|
|
@ -167,7 +167,7 @@ next_track:
|
||||||
inputbuffer = ci->request_buffer(&size, INPUT_CHUNK_SIZE);
|
inputbuffer = ci->request_buffer(&size, INPUT_CHUNK_SIZE);
|
||||||
if (size == 0 || inputbuffer == NULL)
|
if (size == 0 || inputbuffer == NULL)
|
||||||
break;
|
break;
|
||||||
mad_stream_buffer(&stream, inputbuffer, size);
|
mad_stream_buffer(&stream, (unsigned char *)inputbuffer, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mad_frame_decode(&frame, &stream)) {
|
if (mad_frame_decode(&frame, &stream)) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ next_track:
|
||||||
|
|
||||||
/* Read the shorten & wave headers */
|
/* Read the shorten & wave headers */
|
||||||
buf = ci->request_buffer(&bytesleft, MAX_FRAMESIZE);
|
buf = ci->request_buffer(&bytesleft, MAX_FRAMESIZE);
|
||||||
res = shorten_init(&sc, buf, bytesleft);
|
res = shorten_init(&sc, (unsigned char *)buf, bytesleft);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
LOGF("shorten_init error: %d\n", res);
|
LOGF("shorten_init error: %d\n", res);
|
||||||
return CODEC_ERROR;
|
return CODEC_ERROR;
|
||||||
|
@ -139,10 +139,10 @@ seek_start:
|
||||||
ci->yield();
|
ci->yield();
|
||||||
if (cur_chan == 0) {
|
if (cur_chan == 0) {
|
||||||
res = shorten_decode_frame(&sc, decoded0 + sc.nwrap, offset0,
|
res = shorten_decode_frame(&sc, decoded0 + sc.nwrap, offset0,
|
||||||
buf, bytesleft);
|
(unsigned char *)buf, bytesleft);
|
||||||
} else {
|
} else {
|
||||||
res = shorten_decode_frame(&sc, decoded1 + sc.nwrap, offset1,
|
res = shorten_decode_frame(&sc, decoded1 + sc.nwrap, offset1,
|
||||||
buf, bytesleft);
|
(unsigned char *)buf, bytesleft);
|
||||||
}
|
}
|
||||||
cur_chan++;
|
cur_chan++;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue