minor syntax
authorJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 14 Jan 2003 09:00:25 +0000 (09:00 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 14 Jan 2003 09:00:25 +0000 (09:00 +0000)
src/libFLAC/stream_decoder.c
src/plugin_common/replaygain_synthesis.c
test/test_bins.sh
test/test_flac.sh
test/test_grabbag.sh
test/test_libFLAC++.sh
test/test_libFLAC.sh
test/test_libOggFLAC++.sh
test/test_libOggFLAC.sh
test/test_metaflac.sh
test/test_streams.sh

index 447f338..5975da9 100644 (file)
@@ -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;
index 0fab773..5e5be0d 100644 (file)
@@ -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);
index 6fc1815..810ab6d 100755 (executable)
@@ -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 $*
index 4876f55..70a1684 100755 (executable)
@@ -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 $*
index 6cd743f..571f84f 100755 (executable)
@@ -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 $*
index 538b3fb..66c2f9c 100755 (executable)
@@ -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++ $*
index 003f89f..75d77e1 100755 (executable)
@@ -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 $*
index 96f6d35..d562ec5 100755 (executable)
@@ -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++ $*
index 2bb1dfc..a056db6 100755 (executable)
@@ -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 $*
index 80d8938..ef1fbc0 100755 (executable)
@@ -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 $*
index bed5481..b9ff506 100755 (executable)
@@ -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 $*