Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Mar 2022 21:07:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 262634] graphics/libavif: Fix build with clang 14
Message-ID:  <bug-262634-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262634

            Bug ID: 262634
           Summary: graphics/libavif: Fix build with clang 14
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: jbeich@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: jbeich@FreeBSD.org
             Flags: maintainer-feedback?(jbeich@FreeBSD.org)

During an exp-run for llvm 14 (see bug 261742), it turned out that
graphics/libavif fails to build with clang 14:

/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:227:35:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
                            float alphaF =3D (float)srcAlpha / srcMaxChanne=
lF;
                                  ^
/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:242:35:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
                            float alphaF =3D (float)srcAlpha / srcMaxChanne=
lF;
                                  ^
/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:258:31:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
                        float alphaF =3D (float)srcAlpha / srcMaxChannelF;
                              ^
/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:335:35:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
                            float alphaF =3D (float)srcAlpha / srcMaxChanne=
lF;
                                  ^
/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:351:35:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
                            float alphaF =3D (float)srcAlpha / srcMaxChanne=
lF;
                                  ^
/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:368:31:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
                        float alphaF =3D (float)srcAlpha / srcMaxChannelF;
                              ^
/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:397:16:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
    avifResult libyuvResult =3D avifRGBImagePremultiplyAlphaLibYUV(rgb);
               ^
/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.9.3/src/alpha.c:508:16:
error: mixing declarations and code is incompatible with standards before C=
99
[-Werror,-Wdeclaration-after-statement]
    avifResult libyuvResult =3D avifRGBImageUnpremultiplyAlphaLibYUV(rgb);
               ^
8 errors generated.

This is because libavif foolishly uses -Weverything, and thus has to chase
every new warning introduced by newer compiler versions. I submitted
https://github.com/AOMediaCodec/libavif/pull/886 upstream to fix this, and
added the corresponding patch to the port.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262634-7788>