external/libebook/UnpackedTarball_libebook.mk | 1 + external/libebook/enumarith.patch | 17 +++++++++++++++++ external/libwps/UnpackedTarball_libwps.mk | 3 ++- external/libwps/enumarith.patch | 20 ++++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-)
New commits: commit 053c549fddff84d3f8e1d1a2962091fd5f69c662 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Sun Dec 10 22:05:04 2023 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Mon Dec 11 07:59:09 2023 +0100 external/libwps: operation between different enumeration types > MSWrite.cpp:1424:63: error: invalid arithmetic between different enumeration types ('MSWriteParserInternal::BitmapFileHeaderOffset' and 'MSWriteParserInternal::BitmapInfoHeaderV2Offset') > 1424 | unsigned offset = MSWriteParserInternal::BM_FILE_STRUCT_SIZE + MSWriteParserInternal::BM_INFO_V2_STRUCT_SIZE + colors * unsigned(sizeof(MSWriteParserInternal::BitmapPalette)); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ etc. as reported now with --with-latest-c++ (i.e., in C++26 mode) by Clang 18 trunk since <https://github.com/llvm/llvm-project/commit/1cbd52f791d3f088246526c0801634edb65cee31> "[Clang] Implement P2864R2 Remove Deprecated Arithmetic Conversion on Enumerations (#73105)" Change-Id: I6307978bc39e0f965144e0df3ac9a28eb817fe10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160552 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk index f53a8fffc429..de2e2040abdd 100644 --- a/external/libwps/UnpackedTarball_libwps.mk +++ b/external/libwps/UnpackedTarball_libwps.mk @@ -11,13 +11,14 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libwps)) $(eval $(call gb_UnpackedTarball_set_tarball,libwps,$(WPS_TARBALL))) -$(eval $(call gb_UnpackedTarball_set_patchlevel,libwps,1)) +$(eval $(call gb_UnpackedTarball_set_patchlevel,libwps,0)) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwps)) $(eval $(call gb_UnpackedTarball_add_patches,libwps,\ $(if $(SYSTEM_REVENGE),,external/libwps/rpath.patch.0) \ external/libwps/libtool.patch.0 \ + external/libwps/enumarith.patch \ )) ifneq ($(OS),MACOSX) diff --git a/external/libwps/enumarith.patch b/external/libwps/enumarith.patch new file mode 100644 index 000000000000..9cee0cec6dae --- /dev/null +++ b/external/libwps/enumarith.patch @@ -0,0 +1,20 @@ +--- src/lib/MSWrite.cpp ++++ src/lib/MSWrite.cpp +@@ -1421,7 +1421,7 @@ + break; + } + +- unsigned offset = MSWriteParserInternal::BM_FILE_STRUCT_SIZE + MSWriteParserInternal::BM_INFO_V2_STRUCT_SIZE + colors * unsigned(sizeof(MSWriteParserInternal::BitmapPalette)); ++ unsigned offset = +MSWriteParserInternal::BM_FILE_STRUCT_SIZE + MSWriteParserInternal::BM_INFO_V2_STRUCT_SIZE + colors * unsigned(sizeof(MSWriteParserInternal::BitmapPalette)); + + // File header + bmpdata.append('B'); +@@ -1513,7 +1513,7 @@ + bmpdata.append('M'); + MSWriteParserInternal::appendU32(bmpdata, size + MSWriteParserInternal::BM_FILE_STRUCT_SIZE); + MSWriteParserInternal::appendU32(bmpdata, 0); +- MSWriteParserInternal::appendU32(bmpdata, MSWriteParserInternal::BM_FILE_STRUCT_SIZE + MSWriteParserInternal::BM_INFO_V3_STRUCT_SIZE + 4 * colors); ++ MSWriteParserInternal::appendU32(bmpdata, +MSWriteParserInternal::BM_FILE_STRUCT_SIZE + MSWriteParserInternal::BM_INFO_V3_STRUCT_SIZE + 4 * colors); + + bmpdata.append(data, size); + commit cd13a572560ba22dadd8a5523b3aecd1aa0e050e Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Sun Dec 10 21:59:26 2023 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Mon Dec 11 07:58:54 2023 +0100 external/libebook: operation between different enumeration types > EBOOKDocument.cpp:150:37: error: invalid bitwise operation between different enumeration types ('libebook::EBOOKHTMLToken::(unnamed enum at ./EBOOKHTMLToken.h:21:1)' and 'libebook::EBOOKHTMLToken::Namespace') > 150 | if ((EBOOKHTMLToken::html | EBOOKHTMLToken::NS_html) == getHTMLTokenId(name, uri)) > | ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~ etc. as reported now with --with-latest-c++ (i.e., in C++26 mode) by Clang 18 trunk since <https://github.com/llvm/llvm-project/commit/1cbd52f791d3f088246526c0801634edb65cee31> "[Clang] Implement P2864R2 Remove Deprecated Arithmetic Conversion on Enumerations (#73105)" Change-Id: I799932d0dffec5e9345f29e14a2ee3f9a2add133 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160551 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk index 4a6dd2bce5ce..b294b69b19aa 100644 --- a/external/libebook/UnpackedTarball_libebook.mk +++ b/external/libebook/UnpackedTarball_libebook.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0)) $(eval $(call gb_UnpackedTarball_add_patches,libebook, \ external/libebook/libebook-no-icu-boolean.patch.1 \ external/libebook/include.patch \ + external/libebook/enumarith.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libebook/enumarith.patch b/external/libebook/enumarith.patch new file mode 100644 index 000000000000..f82c29d61747 --- /dev/null +++ b/external/libebook/enumarith.patch @@ -0,0 +1,17 @@ +--- src/lib/EBOOKDocument.cpp ++++ src/lib/EBOOKDocument.cpp +@@ -147,11 +147,11 @@ + { + const char *const name = char_cast(xmlTextReaderConstLocalName(reader.get())); + const char *const uri = char_cast(xmlTextReaderConstNamespaceUri(reader.get())); +- if ((EBOOKHTMLToken::html | EBOOKHTMLToken::NS_html) == getHTMLTokenId(name, uri)) ++ if ((+EBOOKHTMLToken::html | EBOOKHTMLToken::NS_html) == getHTMLTokenId(name, uri)) + type = EBOOKDocument::TYPE_XHTML; +- else if ((EPubToken::container | EPubToken::NS_container) == getEPubTokenId(name, uri)) ++ else if ((+EPubToken::container | EPubToken::NS_container) == getEPubTokenId(name, uri)) + type = EBOOKDocument::TYPE_EPUB; +- else if ((EBOOKOPFToken::package | EBOOKOPFToken::NS_opf) == getOPFTokenId(name, uri)) ++ else if ((+EBOOKOPFToken::package | EBOOKOPFToken::NS_opf) == getOPFTokenId(name, uri)) + type = EBOOKDocument::TYPE_EPUB; + else if (EBOOKOPFToken::package == getOPFTokenId(name, uri)) + type = EBOOKDocument::TYPE_OPENEBOOK;