Commit ecf57b75 authored by Josh Coalson's avatar Josh Coalson
Browse files

minor syntax

parent a69b1a8f
......@@ -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;
......
......@@ -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);
......
......@@ -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 $*
......
......@@ -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 $*
......
......@@ -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 $*
......
......@@ -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++ $*
......
......@@ -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 $*
......
......@@ -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++ $*
......
......@@ -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 $*
......
......@@ -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 $*
......
......@@ -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 $*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment