diff --git a/apps/codecs/libwavpack/pack.c b/apps/codecs/libwavpack/pack.c index da4d3f328f..588efccc6f 100644 --- a/apps/codecs/libwavpack/pack.c +++ b/apps/codecs/libwavpack/pack.c @@ -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 diff --git a/apps/codecs/libwavpack/unpack.c b/apps/codecs/libwavpack/unpack.c index 82e5baaaba..a3a689ebb6 100644 --- a/apps/codecs/libwavpack/unpack.c +++ b/apps/codecs/libwavpack/unpack.c @@ -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)) diff --git a/apps/codecs/libwavpack/wavpack.h b/apps/codecs/libwavpack/wavpack.h index bf9b95424e..e26cac353a 100644 --- a/apps/codecs/libwavpack/wavpack.h +++ b/apps/codecs/libwavpack/wavpack.h @@ -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) diff --git a/apps/codecs/libwavpack/words.c b/apps/codecs/libwavpack/words.c index d46bb56911..96e3b60ebb 100644 --- a/apps/codecs/libwavpack/words.c +++ b/apps/codecs/libwavpack/words.c @@ -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; diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c index fb8017d368..1f47eff3ed 100644 --- a/apps/plugins/wav2wv.c +++ b/apps/plugins/wav2wv.c @@ -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;