change "bytes" parameter of all read callbacks from "unsigned" to "size_t"

This commit is contained in:
Josh Coalson
2006-10-15 08:32:56 +00:00
parent 3c91754e74
commit 8065a2d3a5
21 changed files with 94 additions and 88 deletions

View File

@@ -52,7 +52,7 @@ struct FLAC__BitBuffer {
};
static FLAC__bool dummy_read_callback(FLAC__byte buffer[], unsigned *bytes, void *client_data)
static FLAC__bool dummy_read_callback(FLAC__byte buffer[], size_t *bytes, void *client_data)
{
(void)buffer, (void)bytes, (void)client_data;
return true;

View File

@@ -120,10 +120,10 @@ static FLAC__bool generate_file_(FLAC__bool is_ogg)
return true;
}
static FLAC__StreamDecoderReadStatus stream_decoder_read_callback_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
static FLAC__StreamDecoderReadStatus stream_decoder_read_callback_(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
{
StreamDecoderClientData *dcd = (StreamDecoderClientData*)client_data;
const unsigned requested_bytes = *bytes;
const size_t requested_bytes = *bytes;
(void)decoder;

View File

@@ -88,7 +88,7 @@ static void free_metadata_blocks_()
mutils__free_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_);
}
static FLAC__StreamEncoderReadStatus stream_encoder_read_callback_(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
static FLAC__StreamEncoderReadStatus stream_encoder_read_callback_(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
{
(void)encoder, (void)buffer, (void)bytes, (void)client_data;
memset(buffer, 0, *bytes); /* init buffer to avoid valgrind errors */