Date: Sat, 14 Sep 2024 11:32:39 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 281496] devel/olm: fix build with clang 19 Message-ID: <bug-281496-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281496 Bug ID: 281496 Summary: devel/olm: fix build with clang 19 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: dim@FreeBSD.org Clang 19 has become more strict about assigning to const variables, resulting in an error similar to: =20 /wrkdirs/usr/ports/security/olm/work/olm-6d767aaf29bdf15571c2ef4d3f8f9e953d= e03733/include/olm/list.hh:106:13: error: cannot assign to variable 'other_pos' with const-qualified type 'T *const' 106 | ++other_pos; | ^ ~~~~~~~~~ =20 /wrkdirs/usr/ports/security/olm/work/olm-6d767aaf29bdf15571c2ef4d3f8f9e953d= e03733/include/olm/list.hh:102:19: note: variable 'other_pos' declared const here 102 | T * const other_pos =3D other._data; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ In this case, it looks like a typo: "T * const" means that the pointer itself is const, thus it cannot be incremented. Instead, this should be "T const *" (spelled alternatively as "const T *"), which means that the object pointed to is const, not the pointer itself. --=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-281496-7788>