pkgsrc/multimedia/libmp4v2/patches/patch-player_lib_audio_faad_monopred.c
maya fa0a8259fc libmp4v2: fix build more properly.
if 0 likely out of bounds write, we only have one scratch channel,
don't write to a second if asked to do stereo (thanks, GCC 4.5.3!)

convert lowercase min, max to uppercase - libstdc++6 doesn't approve
of it. mostly using sed, because there's too many occurences.

if we're not returning anything, use a void return type.

fix likely issue with signed char - 0251 may be truncated, but the
equivalent \xa9 won't be.

don't store a return value if we're not going to check it.

correct misleading indentation.

Remove -fpermissive too, as it caused jperkin issues. I could build
without removing -Werror, but I'll keep it since it's full of warnings.

XXX do we want a security advisory for this, if it can be triggered?
2017-05-06 18:12:00 +00:00

19 lines
596 B
C

$NetBSD: patch-player_lib_audio_faad_monopred.c,v 1.1 2017/05/06 18:12:00 maya Exp $
We're ignoring the return value anyway, so don't assign
it to anything.
--- player/lib/audio/faad/monopred.c.orig 2002-01-11 00:55:17.000000000 +0000
+++ player/lib/audio/faad/monopred.c
@@ -90,10 +90,9 @@ static void flt_round(float *pf)
static void inv_table_flt_round(float *ftmp)
{
int exp;
- double mnt;
float descale;
- mnt = frexp((double)*ftmp, &exp);
+ (void)frexp((double)*ftmp, &exp);
descale = (float)ldexp(1.0, exp + 15);
*ftmp += descale;
*ftmp -= descale;