Explicitly declare char types to be signed when they must be
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8263 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0dc63c1b71
commit
278f2b3d5a
5 changed files with 9 additions and 9 deletions
|
@ -96,7 +96,7 @@ static void write_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd)
|
||||||
{
|
{
|
||||||
int tcount = wps->num_terms;
|
int tcount = wps->num_terms;
|
||||||
struct decorr_pass *dpp;
|
struct decorr_pass *dpp;
|
||||||
char *byteptr;
|
signed char *byteptr;
|
||||||
|
|
||||||
byteptr = wpmd->data = wpmd->temp_data;
|
byteptr = wpmd->data = wpmd->temp_data;
|
||||||
wpmd->id = ID_DECORR_WEIGHTS;
|
wpmd->id = ID_DECORR_WEIGHTS;
|
||||||
|
@ -108,7 +108,7 @@ static void write_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd)
|
||||||
dpp->weight_B = restore_weight (*byteptr++ = store_weight (dpp->weight_B));
|
dpp->weight_B = restore_weight (*byteptr++ = store_weight (dpp->weight_B));
|
||||||
}
|
}
|
||||||
|
|
||||||
wpmd->byte_length = byteptr - (char *) wpmd->data;
|
wpmd->byte_length = byteptr - (signed char *) wpmd->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allocate room for and copy the decorrelation samples from the decorr_passes
|
// Allocate room for and copy the decorrelation samples from the decorr_passes
|
||||||
|
|
|
@ -125,7 +125,7 @@ int read_decorr_terms (WavpackStream *wps, WavpackMetadata *wpmd)
|
||||||
int read_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd)
|
int read_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd)
|
||||||
{
|
{
|
||||||
int termcnt = wpmd->byte_length, tcount;
|
int termcnt = wpmd->byte_length, tcount;
|
||||||
char *byteptr = wpmd->data;
|
signed char *byteptr = wpmd->data;
|
||||||
struct decorr_pass *dpp;
|
struct decorr_pass *dpp;
|
||||||
|
|
||||||
if (!(wps->wphdr.flags & MONO_FLAG))
|
if (!(wps->wphdr.flags & MONO_FLAG))
|
||||||
|
|
|
@ -386,8 +386,8 @@ void send_words (long *buffer, int nsamples, ulong flags,
|
||||||
void flush_word (struct words_data *w, Bitstream *bs);
|
void flush_word (struct words_data *w, Bitstream *bs);
|
||||||
int log2s (long value);
|
int log2s (long value);
|
||||||
long exp2s (int log);
|
long exp2s (int log);
|
||||||
char store_weight (int weight);
|
signed char store_weight (int weight);
|
||||||
int restore_weight (char weight);
|
int restore_weight (signed char weight);
|
||||||
|
|
||||||
#define WORD_EOF (1L << 31)
|
#define WORD_EOF (1L << 31)
|
||||||
|
|
||||||
|
|
|
@ -762,7 +762,7 @@ long exp2s (int log)
|
||||||
// to and from an 8-bit signed character version for storage in metadata. The
|
// to and from an 8-bit signed character version for storage in metadata. The
|
||||||
// weights are clipped here in the case that they are outside that range.
|
// weights are clipped here in the case that they are outside that range.
|
||||||
|
|
||||||
char store_weight (int weight)
|
signed char store_weight (int weight)
|
||||||
{
|
{
|
||||||
if (weight > 1024)
|
if (weight > 1024)
|
||||||
weight = 1024;
|
weight = 1024;
|
||||||
|
@ -775,7 +775,7 @@ char store_weight (int weight)
|
||||||
return (weight + 4) >> 3;
|
return (weight + 4) >> 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
int restore_weight (char weight)
|
int restore_weight (signed char weight)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ static int wav2wv (char *filename)
|
||||||
unsigned long samples_count, samples_to_pack, bytes_count;
|
unsigned long samples_count, samples_to_pack, bytes_count;
|
||||||
int cnt, buttons;
|
int cnt, buttons;
|
||||||
long value, *lp;
|
long value, *lp;
|
||||||
char *cp;
|
signed char *cp;
|
||||||
|
|
||||||
samples_count = SAMPLES_PER_BLOCK;
|
samples_count = SAMPLES_PER_BLOCK;
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ static int wav2wv (char *filename)
|
||||||
total_bytes_read += bytes_count;
|
total_bytes_read += bytes_count;
|
||||||
WavpackStartBlock (wpc, output_buffer, output_buffer + 0x100000);
|
WavpackStartBlock (wpc, output_buffer, output_buffer + 0x100000);
|
||||||
samples_to_pack = samples_count;
|
samples_to_pack = samples_count;
|
||||||
cp = (char *) input_buffer;
|
cp = (signed char *) input_buffer;
|
||||||
|
|
||||||
while (samples_to_pack) {
|
while (samples_to_pack) {
|
||||||
unsigned long samples_this_pass = TEMP_SAMPLES / num_chans;
|
unsigned long samples_this_pass = TEMP_SAMPLES / num_chans;
|
||||||
|
|
Loading…
Reference in a new issue