FreeBSD Bugzilla – Attachment 252732 Details for
Bug 280796
chinese/opencc: fix build with clang 19
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
chinese/opencc: fix build with clang 19
chinese__opencc-fix-clang19-build-1.diff (text/plain), 2.06 KB, created by
Dimitry Andric
on 2024-08-13 12:13:35 UTC
(
hide
)
Description:
chinese/opencc: fix build with clang 19
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2024-08-13 12:13:35 UTC
Size:
2.06 KB
patch
obsolete
>commit f2f0ec444a59de94bf020c5d1f9602d44f771f80 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2024-08-13T14:12:32+02:00 > > chinese/opencc: fix build with clang 19 > > Clang 19 now diagnoses incorrect member accesses, which causes > chinese/opencc to fail with an error similar to: > > /wrkdirs/usr/ports/chinese/opencc/work/OpenCC-ver.1.1.6/src/../deps/rapidjson-1.1.0/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int') > 319 | GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } > | ~~~~~~ ^ > /wrkdirs/usr/ports/chinese/opencc/work/OpenCC-ver.1.1.6/src/../deps/rapidjson-1.1.0/rapidjson/document.h:325:20: note: non-static data member 'length' declared const here > 325 | const SizeType length; //!< length of the string (excluding the trailing NULL terminator) > | ~~~~~~~~~~~~~~~^~~~~~ > > Upstream rapidjson fixed this by removing the operator= function in > https://github.com/Tencent/rapidjson/commit/3b2441b8, so pull this in as > a patch and apply it. > > PR: 280796 > MFH: 2024Q3 > >diff --git a/chinese/opencc/files/patch-deps_rapidjson-1.1.0_rapidjson_document.h b/chinese/opencc/files/patch-deps_rapidjson-1.1.0_rapidjson_document.h >new file mode 100644 >index 000000000000..00524a9d8445 >--- /dev/null >+++ b/chinese/opencc/files/patch-deps_rapidjson-1.1.0_rapidjson_document.h >@@ -0,0 +1,11 @@ >+--- deps/rapidjson-1.1.0/rapidjson/document.h.orig 2022-12-08 07:44:48 UTC >++++ deps/rapidjson-1.1.0/rapidjson/document.h >+@@ -316,8 +316,6 @@ struct GenericStringRef { >+ >+ GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} >+ >+- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } >+- >+ //! implicit conversion to plain CharType pointer >+ operator const Ch *() const { return s; } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 280796
: 252732