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:
Dave Bryant 2005-12-19 03:12:20 +00:00
parent 0dc63c1b71
commit 278f2b3d5a
5 changed files with 9 additions and 9 deletions

View file

@ -96,7 +96,7 @@ static void write_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd)
{
int tcount = wps->num_terms;
struct decorr_pass *dpp;
char *byteptr;
signed char *byteptr;
byteptr = wpmd->data = wpmd->temp_data;
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));
}
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

View file

@ -125,7 +125,7 @@ int read_decorr_terms (WavpackStream *wps, WavpackMetadata *wpmd)
int read_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd)
{
int termcnt = wpmd->byte_length, tcount;
char *byteptr = wpmd->data;
signed char *byteptr = wpmd->data;
struct decorr_pass *dpp;
if (!(wps->wphdr.flags & MONO_FLAG))

View file

@ -386,8 +386,8 @@ void send_words (long *buffer, int nsamples, ulong flags,
void flush_word (struct words_data *w, Bitstream *bs);
int log2s (long value);
long exp2s (int log);
char store_weight (int weight);
int restore_weight (char weight);
signed char store_weight (int weight);
int restore_weight (signed char weight);
#define WORD_EOF (1L << 31)

View file

@ -762,7 +762,7 @@ long exp2s (int log)
// 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.
char store_weight (int weight)
signed char store_weight (int weight)
{
if (weight > 1024)
weight = 1024;
@ -775,7 +775,7 @@ char store_weight (int weight)
return (weight + 4) >> 3;
}
int restore_weight (char weight)
int restore_weight (signed char weight)
{
int result;

View file

@ -186,7 +186,7 @@ static int wav2wv (char *filename)
unsigned long samples_count, samples_to_pack, bytes_count;
int cnt, buttons;
long value, *lp;
char *cp;
signed char *cp;
samples_count = SAMPLES_PER_BLOCK;
@ -204,7 +204,7 @@ static int wav2wv (char *filename)
total_bytes_read += bytes_count;
WavpackStartBlock (wpc, output_buffer, output_buffer + 0x100000);
samples_to_pack = samples_count;
cp = (char *) input_buffer;
cp = (signed char *) input_buffer;
while (samples_to_pack) {
unsigned long samples_this_pass = TEMP_SAMPLES / num_chans;