dsp: Silence a warning in the compressor code

/* offset = -3db * (ratio - 1) / ratio */
    db_curve[2].offset = (int32_t)((long long)(-3 << 16)
        * (ratio - 1) / ratio);

Results in a warning: left shift of negative value [-Wshift-negative-value]

To fix this, replace the '-3' with -3UL.

(As that is effectively what is already happening)

Change-Id: I5aa269ff332703d3c2d889fa032d2fdc403ff14f
This commit is contained in:
Solomon Peachy 2025-04-22 09:45:24 -04:00
parent 6f5760b41a
commit 303f262acb

View file

@ -276,7 +276,7 @@ static bool compressor_update(struct dsp_config *dsp,
db_curve[2].db = db_curve[1].db + (3 << 16);
if (ratio)
/* offset = -3db * (ratio - 1) / ratio */
db_curve[2].offset = (int32_t)((long long)(-3 << 16)
db_curve[2].offset = (int32_t)((long long)(-3UL << 16)
* (ratio - 1) / ratio);
else
/* offset = -3db for hard limit */