Commit db63b568 authored by Jonas Svedberg's avatar Jonas Svedberg Committed by emerit
Browse files

removed += to avoid int to int16_t truncatio warning when we do deliberate 16bit border wrapping

parent 12c80957
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2114,7 +2114,7 @@ static void hq_phase_ecu(
            }
            else
            {
                *time_offs += (int16_t) output_frame; /* EVS_MONO BE compatible, but EVS CR needed as wrap will cause burst length muting envelope instability issues */
                *time_offs = (int16_t) ( *time_offs + output_frame ); /* EVS_MONO BE compatible, but EVS CR needed as wrap will cause burst length muting envelope instability issues */
            }
#else
            *time_offs += output_frame;
@@ -2123,7 +2123,7 @@ static void hq_phase_ecu(
    else
    {
#ifdef FIX_1179_USAN_PHASEECU
        *time_offs += (int16_t)output_frame; /* cast added for USAN */
        *time_offs = (int16_t)(*time_offs + output_frame) ; /* cast added for USAN, "+=" avoided as it may creat a truncation from int to int16_t  */
#else
        *time_offs += output_frame;
        if ( *time_offs <= 0 )
@@ -2142,7 +2142,7 @@ static void hq_phase_ecu(
    if ( *num_p > 0 )
    {
#ifdef FIX_1179_USAN_PHASEECU 
        seed += (int16_t) ( plocs[*num_p - 1] ); /* explicit cast,  i.e. the seed value may wrap  */
        seed =  ( int16_t )( seed + plocs[*num_p - 1] ); /* explicit cast and "+="  not used,  as it "+="  may create a cast from 32 bit to 16 bit, triggering USAN   */
#else
        seed += plocs[*num_p - 1];
    }