diff options
author | Dave Bryant <bryant@rockbox.org> | 2005-12-19 03:12:20 +0000 |
---|---|---|
committer | Dave Bryant <bryant@rockbox.org> | 2005-12-19 03:12:20 +0000 |
commit | 278f2b3d5ae685660b3bb11e70a46a207610257b (patch) | |
tree | af3199a0737052292d0926e687e7517536596931 | |
parent | 0dc63c1b7145b0b37476bdd701b8d5c15ad038b3 (diff) | |
download | rockbox-278f2b3d5ae685660b3bb11e70a46a207610257b.tar.gz rockbox-278f2b3d5ae685660b3bb11e70a46a207610257b.zip |
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
-rw-r--r-- | apps/codecs/libwavpack/pack.c | 4 | ||||
-rw-r--r-- | apps/codecs/libwavpack/unpack.c | 2 | ||||
-rw-r--r-- | apps/codecs/libwavpack/wavpack.h | 4 | ||||
-rw-r--r-- | apps/codecs/libwavpack/words.c | 4 | ||||
-rw-r--r-- | apps/plugins/wav2wv.c | 4 |
5 files changed, 9 insertions, 9 deletions
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) | |||
96 | { | 96 | { |
97 | int tcount = wps->num_terms; | 97 | int tcount = wps->num_terms; |
98 | struct decorr_pass *dpp; | 98 | struct decorr_pass *dpp; |
99 | char *byteptr; | 99 | signed char *byteptr; |
100 | 100 | ||
101 | byteptr = wpmd->data = wpmd->temp_data; | 101 | byteptr = wpmd->data = wpmd->temp_data; |
102 | wpmd->id = ID_DECORR_WEIGHTS; | 102 | wpmd->id = ID_DECORR_WEIGHTS; |
@@ -108,7 +108,7 @@ static void write_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd) | |||
108 | dpp->weight_B = restore_weight (*byteptr++ = store_weight (dpp->weight_B)); | 108 | dpp->weight_B = restore_weight (*byteptr++ = store_weight (dpp->weight_B)); |
109 | } | 109 | } |
110 | 110 | ||
111 | wpmd->byte_length = byteptr - (char *) wpmd->data; | 111 | wpmd->byte_length = byteptr - (signed char *) wpmd->data; |
112 | } | 112 | } |
113 | 113 | ||
114 | // Allocate room for and copy the decorrelation samples from the decorr_passes | 114 | // 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) | |||
125 | int read_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd) | 125 | int read_decorr_weights (WavpackStream *wps, WavpackMetadata *wpmd) |
126 | { | 126 | { |
127 | int termcnt = wpmd->byte_length, tcount; | 127 | int termcnt = wpmd->byte_length, tcount; |
128 | char *byteptr = wpmd->data; | 128 | signed char *byteptr = wpmd->data; |
129 | struct decorr_pass *dpp; | 129 | struct decorr_pass *dpp; |
130 | 130 | ||
131 | if (!(wps->wphdr.flags & MONO_FLAG)) | 131 | 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, | |||
386 | void flush_word (struct words_data *w, Bitstream *bs); | 386 | void flush_word (struct words_data *w, Bitstream *bs); |
387 | int log2s (long value); | 387 | int log2s (long value); |
388 | long exp2s (int log); | 388 | long exp2s (int log); |
389 | char store_weight (int weight); | 389 | signed char store_weight (int weight); |
390 | int restore_weight (char weight); | 390 | int restore_weight (signed char weight); |
391 | 391 | ||
392 | #define WORD_EOF (1L << 31) | 392 | #define WORD_EOF (1L << 31) |
393 | 393 | ||
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) | |||
762 | // to and from an 8-bit signed character version for storage in metadata. The | 762 | // to and from an 8-bit signed character version for storage in metadata. The |
763 | // weights are clipped here in the case that they are outside that range. | 763 | // weights are clipped here in the case that they are outside that range. |
764 | 764 | ||
765 | char store_weight (int weight) | 765 | signed char store_weight (int weight) |
766 | { | 766 | { |
767 | if (weight > 1024) | 767 | if (weight > 1024) |
768 | weight = 1024; | 768 | weight = 1024; |
@@ -775,7 +775,7 @@ char store_weight (int weight) | |||
775 | return (weight + 4) >> 3; | 775 | return (weight + 4) >> 3; |
776 | } | 776 | } |
777 | 777 | ||
778 | int restore_weight (char weight) | 778 | int restore_weight (signed char weight) |
779 | { | 779 | { |
780 | int result; | 780 | int result; |
781 | 781 | ||
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) | |||
186 | unsigned long samples_count, samples_to_pack, bytes_count; | 186 | unsigned long samples_count, samples_to_pack, bytes_count; |
187 | int cnt, buttons; | 187 | int cnt, buttons; |
188 | long value, *lp; | 188 | long value, *lp; |
189 | char *cp; | 189 | signed char *cp; |
190 | 190 | ||
191 | samples_count = SAMPLES_PER_BLOCK; | 191 | samples_count = SAMPLES_PER_BLOCK; |
192 | 192 | ||
@@ -204,7 +204,7 @@ static int wav2wv (char *filename) | |||
204 | total_bytes_read += bytes_count; | 204 | total_bytes_read += bytes_count; |
205 | WavpackStartBlock (wpc, output_buffer, output_buffer + 0x100000); | 205 | WavpackStartBlock (wpc, output_buffer, output_buffer + 0x100000); |
206 | samples_to_pack = samples_count; | 206 | samples_to_pack = samples_count; |
207 | cp = (char *) input_buffer; | 207 | cp = (signed char *) input_buffer; |
208 | 208 | ||
209 | while (samples_to_pack) { | 209 | while (samples_to_pack) { |
210 | unsigned long samples_this_pass = TEMP_SAMPLES / num_chans; | 210 | unsigned long samples_this_pass = TEMP_SAMPLES / num_chans; |