!4 [sync] PR-2: fix: build error assign const _xmlError value to _xmlError
From: @openeuler-sync-bot Reviewed-by: @Jingwiw Signed-off-by: @Jingwiw
This commit is contained in:
commit
606d4f08fa
@ -8,7 +8,7 @@
|
||||
|
||||
Name: R-%{packname}
|
||||
Version: 1.3.2
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Parse XML
|
||||
|
||||
License: GPLv2+
|
||||
@ -28,6 +28,7 @@ BuildRequires: R-httr
|
||||
BuildRequires: R-knitr
|
||||
BuildRequires: R-rmarkdown
|
||||
%endif
|
||||
Patch0: fix-build-error-assign-const-_xmlError-value-to-_xml.patch
|
||||
|
||||
%description
|
||||
Work with XML files using a simple, consistent interface. Built on top of
|
||||
@ -44,6 +45,7 @@ Development files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -c -n %{packname}
|
||||
%patch0 -p1
|
||||
sed -i 's/covr, //g' %{packname}/DESCRIPTION
|
||||
|
||||
|
||||
@ -85,5 +87,8 @@ _R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --ignore-vignettes
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Apr 17 2024 zhangxianting <zhangxianting@uniontech.com> - 1.3.2-2
|
||||
- fix: build error assign const _xmlError value to _xmlError
|
||||
|
||||
* Wed Jun 15 2022 misaka00251 <misaka00251@misakanet.cn> - 1.3.2-1
|
||||
- Init package (Thanks to fedora team)
|
||||
|
||||
39
fix-build-error-assign-const-_xmlError-value-to-_xml.patch
Normal file
39
fix-build-error-assign-const-_xmlError-value-to-_xml.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From fc0c89940e80ac52bbc9d3f5cdbb72c94bc25ad2 Mon Sep 17 00:00:00 2001
|
||||
From: zhangxianting <zhangxianting@uniontech.com>
|
||||
Date: Thu, 11 Apr 2024 02:00:53 +0800
|
||||
Subject: [PATCH] fix build error :assign const _xmlError * value to _xmlError
|
||||
|
||||
---
|
||||
xml2/src/xml2_init.cpp | 2 +-
|
||||
xml2/src/xml2_schema.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xml2/src/xml2_init.cpp b/xml2/src/xml2_init.cpp
|
||||
index b89c64a..0ff2782 100644
|
||||
--- a/xml2/src/xml2_init.cpp
|
||||
+++ b/xml2/src/xml2_init.cpp
|
||||
@@ -43,7 +43,7 @@ extern "C" SEXP init_libxml2() {
|
||||
LIBXML_TEST_VERSION
|
||||
|
||||
xmlInitParser();
|
||||
- xmlSetStructuredErrorFunc(NULL, handleStructuredError);
|
||||
+ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc)handleStructuredError);
|
||||
xmlSetGenericErrorFunc(NULL, handleGenericError);
|
||||
|
||||
return R_NilValue;
|
||||
diff --git a/xml2/src/xml2_schema.cpp b/xml2/src/xml2_schema.cpp
|
||||
index dfe37e5..fe6fa9a 100644
|
||||
--- a/xml2/src/xml2_schema.cpp
|
||||
+++ b/xml2/src/xml2_schema.cpp
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string>
|
||||
#include "xml2_utils.h"
|
||||
|
||||
-void handleSchemaError(void* userData, xmlError* error) {
|
||||
+void handleSchemaError(void* userData, const xmlError* error) {
|
||||
std::vector<std::string> * vec = (std::vector<std::string> *) userData;
|
||||
std::string message = std::string(error->message);
|
||||
message.resize(message.size() - 1);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user