diff options
author | Josh Coalson <jcoalson@users.sourceforce.net> | 2003-01-14 09:00:25 +0000 |
---|---|---|
committer | Josh Coalson <jcoalson@users.sourceforce.net> | 2003-01-14 09:00:25 +0000 |
commit | ecf57b7514dd6f05820ca8be9e72d40de11f9810 (patch) | |
tree | 667299fd926916f82dd73f6d4dfecfef89222fe9 | |
parent | a69b1a8f544eaf87a5e5cce1fe864568e5b752ac (diff) | |
download | flac-ecf57b7514dd6f05820ca8be9e72d40de11f9810.tar.gz |
minor syntax
-rw-r--r-- | src/libFLAC/stream_decoder.c | 8 | ||||
-rw-r--r-- | src/plugin_common/replaygain_synthesis.c | 6 | ||||
-rwxr-xr-x | test/test_bins.sh | 2 | ||||
-rwxr-xr-x | test/test_flac.sh | 2 | ||||
-rwxr-xr-x | test/test_grabbag.sh | 2 | ||||
-rwxr-xr-x | test/test_libFLAC++.sh | 2 | ||||
-rwxr-xr-x | test/test_libFLAC.sh | 2 | ||||
-rwxr-xr-x | test/test_libOggFLAC++.sh | 2 | ||||
-rwxr-xr-x | test/test_libOggFLAC.sh | 2 | ||||
-rwxr-xr-x | test/test_metaflac.sh | 4 | ||||
-rwxr-xr-x | test/test_streams.sh | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 447f3381..5975da94 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -390,9 +390,9 @@ FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecode FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); FLAC__ASSERT(0 != decoder->protected_); - FLAC__ASSERT(type < (1u << FLAC__STREAM_METADATA_TYPE_LEN)); + FLAC__ASSERT((unsigned)type < (1u << FLAC__STREAM_METADATA_TYPE_LEN)); /* double protection */ - if(type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN)) + if((unsigned)type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN)) return false; if(decoder->protected_->state != FLAC__STREAM_DECODER_UNINITIALIZED) return false; @@ -447,9 +447,9 @@ FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); FLAC__ASSERT(0 != decoder->protected_); - FLAC__ASSERT(type < (1u << FLAC__STREAM_METADATA_TYPE_LEN)); + FLAC__ASSERT((unsigned)type < (1u << FLAC__STREAM_METADATA_TYPE_LEN)); /* double protection */ - if(type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN)) + if((unsigned)type >= (1u << FLAC__STREAM_METADATA_TYPE_LEN)) return false; if(decoder->protected_->state != FLAC__STREAM_DECODER_UNINITIALIZED) return false; diff --git a/src/plugin_common/replaygain_synthesis.c b/src/plugin_common/replaygain_synthesis.c index 0fab773d..5e5be0d3 100644 --- a/src/plugin_common/replaygain_synthesis.c +++ b/src/plugin_common/replaygain_synthesis.c @@ -218,7 +218,7 @@ void FLAC__plugin_common__init_dither_context(DitherContext *d, int bits, int sh d->FilterCoeff = F [shapingtype]; d->Mask = ((FLAC__uint64)-1) << (32 - bits); d->Add = 0.5 * ((1L << (32 - bits)) - 1); - d->Dither = 0.01*default_dither[index] / (((FLAC__int64)1) << bits); + d->Dither = 0.01f*default_dither[index] / (((FLAC__int64)1) << bits); } /* @@ -236,13 +236,13 @@ static FLAC__INLINE FLAC__int64 dither_output_(DitherContext *d, FLAC__bool do_d if(shapingtype == 0) { double tmp = random_equi_(d->Dither); Sum2 = tmp - d->LastRandomNumber [k]; - d->LastRandomNumber [k] = tmp; + d->LastRandomNumber [k] = (int)tmp; Sum2 = Sum += Sum2; val = ROUND64(Sum2) & d->Mask; } else { Sum2 = random_triangular_(d->Dither) - scalar16_(d->DitherHistory[k], d->FilterCoeff + i); - Sum += d->DitherHistory [k] [(-1-i)&15] = Sum2; + Sum += d->DitherHistory [k] [(-1-i)&15] = (float)Sum2; Sum2 = Sum + scalar16_(d->ErrorHistory [k], d->FilterCoeff + i); val = ROUND64(Sum2) & d->Mask; d->ErrorHistory [k] [(-1-i)&15] = (float)(Sum - val); diff --git a/test/test_bins.sh b/test/test_bins.sh index 6fc1815e..810ab6d1 100755 --- a/test/test_bins.sh +++ b/test/test_bins.sh @@ -32,7 +32,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" run_flac () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_bins.valgrind.log else flac $* diff --git a/test/test_flac.sh b/test/test_flac.sh index 4876f55b..70a16840 100755 --- a/test/test_flac.sh +++ b/test/test_flac.sh @@ -31,7 +31,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" run_flac () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_flac.valgrind.log else flac $* diff --git a/test/test_grabbag.sh b/test/test_grabbag.sh index 6cd743f1..571f84fb 100755 --- a/test/test_grabbag.sh +++ b/test/test_grabbag.sh @@ -31,7 +31,7 @@ test_cuesheet -h 1>/dev/null 2>/dev/null || die "ERROR can't find test_cuesheet run_test_cuesheet () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_cuesheet $* 4>>test_grabbag.valgrind.log else test_cuesheet $* diff --git a/test/test_libFLAC++.sh b/test/test_libFLAC++.sh index 538b3fbe..66c2f9cc 100755 --- a/test/test_libFLAC++.sh +++ b/test/test_libFLAC++.sh @@ -30,7 +30,7 @@ export PATH run_test_libFLACpp () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC++ $* 4>>test_libFLAC++.valgrind.log else test_libFLAC++ $* diff --git a/test/test_libFLAC.sh b/test/test_libFLAC.sh index 003f89f7..75d77e1e 100755 --- a/test/test_libFLAC.sh +++ b/test/test_libFLAC.sh @@ -30,7 +30,7 @@ export PATH run_test_libFLAC () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC $* 4>>test_libFLAC.valgrind.log else test_libFLAC $* diff --git a/test/test_libOggFLAC++.sh b/test/test_libOggFLAC++.sh index 96f6d354..d562ec57 100755 --- a/test/test_libOggFLAC++.sh +++ b/test/test_libOggFLAC++.sh @@ -30,7 +30,7 @@ export PATH run_test_libOggFLACpp () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC++ $* 4>>test_libOggFLAC++.valgrind.log else test_libOggFLAC++ $* diff --git a/test/test_libOggFLAC.sh b/test/test_libOggFLAC.sh index 2bb1dfcf..a056db67 100755 --- a/test/test_libOggFLAC.sh +++ b/test/test_libOggFLAC.sh @@ -30,7 +30,7 @@ export PATH run_test_libOggFLAC () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC $* 4>>test_libOggFLAC.valgrind.log else test_libOggFLAC $* diff --git a/test/test_metaflac.sh b/test/test_metaflac.sh index 80d89384..ef1fbc0c 100755 --- a/test/test_metaflac.sh +++ b/test/test_metaflac.sh @@ -34,7 +34,7 @@ metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac execut run_flac () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_metaflac.valgrind.log else flac $* @@ -43,7 +43,7 @@ run_flac () run_metaflac () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_metaflac.valgrind.log else metaflac $* diff --git a/test/test_streams.sh b/test/test_streams.sh index bed54816..b9ff5069 100755 --- a/test/test_streams.sh +++ b/test/test_streams.sh @@ -31,7 +31,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" run_flac () { - if [ "$FLAC__VALGRIND" = yes ] ; then + if [ x"$FLAC__VALGRIND" = xyes ] ; then valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_streams.valgrind.log else flac $* |