diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/bs2b.c | 30 | ||||
-rw-r--r-- | src/bs2bconvert.c | 2 | ||||
-rw-r--r-- | src/bs2bstream.c | 14 | ||||
-rw-r--r-- | win32/bs2bconvert/bs2bconvert.vcproj | 4 | ||||
-rw-r--r-- | win32/bs2bstream/bs2bstream.vcproj | 4 |
6 files changed, 30 insertions, 27 deletions
@@ -1,3 +1,6 @@ +2009-05-18 Boris Mikhaylov <http://www.tmn.ru/~bor> + * Fixed for higher compile warning level. + 2009-05-17 Sebastian Pipping <sebastian@pipping.org> * Apply compile fix patch for FreeBSD by Diego Elio Petteno (flameeyes@gentoo) @@ -220,9 +220,9 @@ static void cross_feed_d( t_bs2bdp bs2bdp, double *sample ) t_bs2bdp bs2b_open( void ) { - t_bs2bdp bs2bdp = 0; + t_bs2bdp bs2bdp = NULL; - if( bs2bdp = malloc( sizeof( t_bs2bd ) ) ) + if( NULL != ( bs2bdp = malloc( sizeof( t_bs2bd ) ) ) ) { memset( bs2bdp, 0, sizeof( t_bs2bd ) ); bs2b_set_srate( bs2bdp, BS2B_DEFAULT_SRATE ); @@ -238,7 +238,7 @@ void bs2b_close( t_bs2bdp bs2bdp ) void bs2b_set_level( t_bs2bdp bs2bdp, uint32_t level ) { - if( ! bs2bdp ) return; + if( NULL == bs2bdp ) return; if( level == bs2bdp->level ) return; @@ -255,7 +255,7 @@ void bs2b_set_level_fcut( t_bs2bdp bs2bdp, int fcut ) { uint32_t level; - if( ! bs2bdp ) return; + if( NULL == bs2bdp ) return; level = bs2bdp->level; level &= 0xffff0000; @@ -272,7 +272,7 @@ void bs2b_set_level_feed( t_bs2bdp bs2bdp, int feed ) { uint32_t level; - if( ! bs2bdp ) return; + if( NULL == bs2bdp ) return; level = bs2bdp->level; level &= ( uint32_t )0xffff; @@ -299,7 +299,7 @@ int bs2b_get_level_delay( t_bs2bdp bs2bdp ) void bs2b_set_srate( t_bs2bdp bs2bdp, uint32_t srate ) { - if( ! bs2bdp ) return; + if( NULL == bs2bdp ) return; if( srate == bs2bdp->srate ) return; @@ -315,7 +315,7 @@ uint32_t bs2b_get_srate( t_bs2bdp bs2bdp ) void bs2b_clear( t_bs2bdp bs2bdp ) { - if( ! bs2bdp ) return; + if( NULL == bs2bdp ) return; memset( &bs2bdp->lfs, 0, sizeof( bs2bdp->lfs ) ); } /* bs2b_clear() */ @@ -592,8 +592,8 @@ void bs2b_cross_feed_s32be( t_bs2bdp bs2bdp, int32_t *sample, int n ) while( n-- ) { #ifndef WORDS_BIGENDIAN - int32swap( sample ); - int32swap( sample + 1 ); + int32swap( ( uint32_t * )sample ); + int32swap( ( uint32_t * )( sample + 1 ) ); #endif sample_d[ 0 ] = ( double )sample[ 0 ]; @@ -611,8 +611,8 @@ void bs2b_cross_feed_s32be( t_bs2bdp bs2bdp, int32_t *sample, int n ) sample[ 1 ] = ( int32_t )sample_d[ 1 ]; #ifndef WORDS_BIGENDIAN - int32swap( sample ); - int32swap( sample + 1 ); + int32swap( ( uint32_t * )sample ); + int32swap( ( uint32_t * )( sample + 1 ) ); #endif sample += 2; @@ -794,8 +794,8 @@ void bs2b_cross_feed_s16be( t_bs2bdp bs2bdp, int16_t *sample, int n ) while( n-- ) { #ifndef WORDS_BIGENDIAN - int16swap( sample ); - int16swap( sample + 1 ); + int16swap( ( uint16_t * )sample ); + int16swap( ( uint16_t * )( sample + 1 ) ); #endif sample_d[ 0 ] = ( double )sample[ 0 ]; @@ -813,8 +813,8 @@ void bs2b_cross_feed_s16be( t_bs2bdp bs2bdp, int16_t *sample, int n ) sample[ 1 ] = ( int16_t )sample_d[ 1 ]; #ifndef WORDS_BIGENDIAN - int16swap( sample ); - int16swap( sample + 1 ); + int16swap( ( uint16_t * )sample ); + int16swap( ( uint16_t * )( sample + 1 ) ); #endif sample += 2; diff --git a/src/bs2bconvert.c b/src/bs2bconvert.c index 2d635ac..6c1f2ac 100644 --- a/src/bs2bconvert.c +++ b/src/bs2bconvert.c @@ -136,7 +136,7 @@ int main( int argc, char *argv[] ) printf( "Converting file %s to file %s\nsample rate=%u...", infilename, outfilename, srate ); - if( !( bs2bdp = bs2b_open() ) ) + if( NULL == ( bs2bdp = bs2b_open() ) ) { puts( "Not able to allocate data\n" ); sf_close( infile ); diff --git a/src/bs2bstream.c b/src/bs2bstream.c index ae9ddde..c880c53 100644 --- a/src/bs2bstream.c +++ b/src/bs2bstream.c @@ -195,7 +195,7 @@ int main( int argc, char *argv[] ) while( 2 == fread( sample, sizeof( int8_t ), 2, stdin ) ) { if( unsigned_flag ) - bs2b_cross_feed_u8( bs2bdp, sample, 1 ); + bs2b_cross_feed_u8( bs2bdp, ( uint8_t * )sample, 1 ); else bs2b_cross_feed_s8( bs2bdp, sample, 1 ); @@ -214,7 +214,7 @@ int main( int argc, char *argv[] ) case 'b': { if( unsigned_flag ) - bs2b_cross_feed_u16be( bs2bdp, sample, 1 ); + bs2b_cross_feed_u16be( bs2bdp, ( uint16_t * )sample, 1 ); else bs2b_cross_feed_s16be( bs2bdp, sample, 1 ); } @@ -223,7 +223,7 @@ int main( int argc, char *argv[] ) case 'l': { if( unsigned_flag ) - bs2b_cross_feed_u16le( bs2bdp, sample, 1 ); + bs2b_cross_feed_u16le( bs2bdp, ( uint16_t * )sample, 1 ); else bs2b_cross_feed_s16le( bs2bdp, sample, 1 ); } @@ -232,7 +232,7 @@ int main( int argc, char *argv[] ) default: { if( unsigned_flag ) - bs2b_cross_feed_u16( bs2bdp, sample, 1 ); + bs2b_cross_feed_u16( bs2bdp, ( uint16_t * )sample, 1 ); else bs2b_cross_feed_s16( bs2bdp, sample, 1 ); } @@ -294,7 +294,7 @@ int main( int argc, char *argv[] ) case 'b': { if( unsigned_flag ) - bs2b_cross_feed_u32be( bs2bdp, sample, 1 ); + bs2b_cross_feed_u32be( bs2bdp, ( uint32_t * )sample, 1 ); else bs2b_cross_feed_s32be( bs2bdp, sample, 1 ); } @@ -303,7 +303,7 @@ int main( int argc, char *argv[] ) case 'l': { if( unsigned_flag ) - bs2b_cross_feed_u32le( bs2bdp, sample, 1 ); + bs2b_cross_feed_u32le( bs2bdp, ( uint32_t * )sample, 1 ); else bs2b_cross_feed_s32le( bs2bdp, sample, 1 ); } @@ -312,7 +312,7 @@ int main( int argc, char *argv[] ) default: { if( unsigned_flag ) - bs2b_cross_feed_u32( bs2bdp, sample, 1 ); + bs2b_cross_feed_u32( bs2bdp, ( uint32_t * )sample, 1 ); else bs2b_cross_feed_s32( bs2bdp, sample, 1 ); } diff --git a/win32/bs2bconvert/bs2bconvert.vcproj b/win32/bs2bconvert/bs2bconvert.vcproj index 2852dd3..7b0a76a 100644 --- a/win32/bs2bconvert/bs2bconvert.vcproj +++ b/win32/bs2bconvert/bs2bconvert.vcproj @@ -47,7 +47,7 @@ MinimalRebuild="false"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
- WarningLevel="3"
+ WarningLevel="4"
DebugInformationFormat="3"
CompileAs="0"
/>
@@ -127,7 +127,7 @@ RuntimeLibrary="0"
FloatingPointModel="2"
RuntimeTypeInfo="false"
- WarningLevel="3"
+ WarningLevel="4"
DebugInformationFormat="0"
CompileAs="0"
/>
diff --git a/win32/bs2bstream/bs2bstream.vcproj b/win32/bs2bstream/bs2bstream.vcproj index 28c50ad..d0905e0 100644 --- a/win32/bs2bstream/bs2bstream.vcproj +++ b/win32/bs2bstream/bs2bstream.vcproj @@ -47,7 +47,7 @@ MinimalRebuild="false"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
- WarningLevel="3"
+ WarningLevel="4"
DebugInformationFormat="3"
CompileAs="0"
/>
@@ -126,7 +126,7 @@ RuntimeLibrary="0"
FloatingPointModel="2"
RuntimeTypeInfo="false"
- WarningLevel="3"
+ WarningLevel="4"
DebugInformationFormat="0"
CompileAs="0"
/>
|