minor bug in IPP Speech Samples

minor bug in IPP Speech Samples

Your function "__INLINE int Mul2_32s(int val)" (in the owng729.h file) has the following conditional statements:

line 490: if(val > 0x3fffffff)


line 493: if( val < 0xc0000000).

A gcc -Wall compile says "In function 'int Mul2_32s(int)': warning: comparison between signed and unsigned integer expressions", and a quick test shows that Mul2_32s( 6 ) is not 12: it is _MIN_INT, so i am changing the code to if( val < (int)0xc0000000) and if( val > (int)0x3fffffff ). Am i correct in stating that this was a bug? (a minor one, yes, i know, but still...)


1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.