Date: Fri, 13 Sep 2024 09:11:22 +0000 From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 281477] audio/libaudiofile: fix build with clang 19, enable tests Message-ID: <bug-281477-6497@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281477 Bug ID: 281477 Summary: audio/libaudiofile: fix build with clang 19, enable tests Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: gnome@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: gnome@FreeBSD.org Flags: maintainer-feedback?(gnome@FreeBSD.org) Clang 19 has become more strict about initialization with undefined behavior, resulting in errors similar to: ./SimpleModule.h:126:40: error: in-class initializer for static data memb= er is not a constant expression 126 | static const int kMinSignedValue =3D -1 << kScaleBits; | ~~~^~~~~~~~~~~~~ ./SimpleModule.h:176:22: note: in instantiation of template class 'signConverter<kInt8>' requested here 176 | transform<typename signConverter<Format>::signedToUnsigned>(src, dst, count); | ^ ./SimpleModule.h:183:5: note: in instantiation of function template specialization 'ConvertSign::convertSignedToUnsigned<kInt8>' requested here 183 | convertSignedToUnsigned<kInt8>(sr= c, dst, count); | ^ This is because left-shifting negative values is undefined. Replace -1 with ~0u which results in the expected value. While here, add a few other patches to remove warnings about undefined left-shifts, and add support for the "make test" target. --=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-281477-6497>