Compare commits

..

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
f3531e9594
!10 Add -Wunreachable-code
From: @cao-fei8 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2023-07-18 12:56:59 +00:00
caofei
9561e162fd Add -Wunreachable-code
Reference:
https://github.com/dajobe/librdf/commit/45cafb31

Signed-off-by: caofei <caofei@xfusion.com>
2023-07-18 01:34:30 +08:00
openeuler-ci-bot
0052d23959
!5 Fix unreachable codes - break after return mostly
From: @cao-fei8 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2023-01-17 09:23:06 +00:00
cao-fei8
4023f97cc3 Fix unreachable codes - break after return mostly
Reference:
fdd8af8d03

Signed-off-by: cao-fei8 <caofei@xfusion.com>
2023-01-16 23:11:48 +08:00
openeuler-ci-bot
c11e7eb74a
!4 增加对sqlite和mariadb的支持
From: @duyiwei7w 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2022-03-07 01:34:09 +00:00
duyiwei
8419195095 add support of sqlite and mariadb 2022-03-05 16:26:07 +08:00
openeuler-ci-bot
ac5da2611a !3 add redland.yaml
Merge pull request !3 from 成子晗/master
2020-05-07 17:19:04 +08:00
chengzihan2
42d5813ec6 add redland.yaml 2020-05-06 16:26:21 +08:00
openeuler-ci-bot
3f63f6df15 !2 fix build error
Merge pull request !2 from jiaxiyajiaxiya/master
2019-12-13 10:09:38 +08:00
jiaxiya
faabb95a05 fix build error 2019-12-12 17:08:33 +08:00
openeuler-ci-bot
b75fc24371 !1 init commit
Merge pull request !1 from jiaxiyajiaxiya/master
2019-12-09 15:01:55 +08:00
4 changed files with 172 additions and 6 deletions

View File

@ -0,0 +1,24 @@
From 45cafb3157d74a8ac718a9278ae88da841d5c647 Mon Sep 17 00:00:00 2001
From: Dave Beckett <dave@dajobe.org>
Date: Thu, 27 Feb 2014 09:38:02 -0600
Subject: [PATCH] Add -Wunreachable-code
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index b7b220ae..15def330 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,6 +233,7 @@ possible_warnings="\
-Wstrict-prototypes \
-Wswitch-enum \
-Wundef \
+-Wunreachable-code \
-Wunsafe-loop-optimizations \
-Wwrite-strings \
\
--
2.33.0

View File

@ -0,0 +1,123 @@
From fdd8af8d038d44d304bfaad198144af57cee370c Mon Sep 17 00:00:00 2001
From: Dave Beckett <dave@dajobe.org>
Date: Thu, 27 Feb 2014 09:38:29 -0600
Subject: [PATCH] Fix unreachable codes - break after return mostly
---
src/rdf_hash.c | 6 ------
src/rdf_query_rasqal.c | 3 ---
src/rdf_query_virtuoso.c | 1 -
src/rdf_raptor.c | 1 -
src/rdf_storage.c | 1 -
src/rdf_storage_hashes.c | 1 -
src/rdf_storage_virtuoso.c | 1 -
7 files changed, 14 deletions(-)
diff --git a/src/rdf_hash.c b/src/rdf_hash.c
index e297918e..9853f895 100644
--- a/src/rdf_hash.c
+++ b/src/rdf_hash.c
@@ -1507,12 +1507,6 @@ librdf_hash_from_string(librdf_hash* hash, const char *string)
p++;
break;
-
- default:
- librdf_log(hash->world,
- 0, LIBRDF_LOG_ERROR, LIBRDF_FROM_HASH, NULL,
- "No such state %d", state);
- return 1;
}
}
return 0;
diff --git a/src/rdf_query_rasqal.c b/src/rdf_query_rasqal.c
index 3370f288..b2389925 100644
--- a/src/rdf_query_rasqal.c
+++ b/src/rdf_query_rasqal.c
@@ -1279,7 +1279,6 @@ librdf_query_rasqal_constructor(librdf_world *world)
if(!world->rasqal_world_ptr) {
LIBRDF_FATAL1(world, LIBRDF_FROM_QUERY, "failed to initialize rasqal");
- return 1;
}
/* Make sure rasqal works with the same raptor instance as everyone else. */
@@ -1292,7 +1291,6 @@ librdf_query_rasqal_constructor(librdf_world *world)
if(rasqal_world_open(world->rasqal_world_ptr)) {
LIBRDF_FATAL1(world, LIBRDF_FROM_QUERY, "failed to initialize rasqal");
- return 1;
}
}
@@ -1314,7 +1312,6 @@ librdf_query_rasqal_constructor(librdf_world *world)
desc = rasqal_world_get_query_language_description(world->rasqal_world_ptr, i);
if(!desc) {
LIBRDF_FATAL1(world, LIBRDF_FROM_QUERY, "failed to initialize rasqal");
- return 1;
}
}
diff --git a/src/rdf_query_virtuoso.c b/src/rdf_query_virtuoso.c
index 92c34859..a6b15617 100644
--- a/src/rdf_query_virtuoso.c
+++ b/src/rdf_query_virtuoso.c
@@ -694,7 +694,6 @@ librdf_query_virtuoso_results_get_binding_value_by_name(librdf_query_results *qu
for(col = 0; col < context->numCols; col++) {
if(!strcmp((const char*)name, (const char*)context->colNames[col])) {
return context->colValues[col];
- break;
}
}
diff --git a/src/rdf_raptor.c b/src/rdf_raptor.c
index 5f5fbbdf..37a07ab0 100644
--- a/src/rdf_raptor.c
+++ b/src/rdf_raptor.c
@@ -192,7 +192,6 @@ librdf_init_raptor(librdf_world* world)
if(!world->raptor_world_ptr || raptor_world_open(world->raptor_world_ptr)) {
LIBRDF_FATAL1(world, LIBRDF_FROM_PARSER, "failed to initialize raptor");
- return 1;
}
}
diff --git a/src/rdf_storage.c b/src/rdf_storage.c
index a2dcc4bd..d0173edd 100644
--- a/src/rdf_storage.c
+++ b/src/rdf_storage.c
@@ -414,7 +414,6 @@ librdf_storage_register_factory(librdf_world* world,
failed:
LIBRDF_FATAL1(world, LIBRDF_FROM_STORAGE, "Registering storage failed");
- return 1;
}
diff --git a/src/rdf_storage_hashes.c b/src/rdf_storage_hashes.c
index cb7871b3..11afc9be 100644
--- a/src/rdf_storage_hashes.c
+++ b/src/rdf_storage_hashes.c
@@ -1252,7 +1252,6 @@ librdf_storage_hashes_node_iterator_get_method(void* iterator, int flags)
librdf_statement_set_predicate(&context->statement2, node);
librdf_statement_set_object(&context->statement2, librdf_statement_get_object(&context->statement));
return (void*)&context->statement2;
- break;
default: /* error */
librdf_log(context->iterator->world,
diff --git a/src/rdf_storage_virtuoso.c b/src/rdf_storage_virtuoso.c
index ca9b2655..3d27f023 100644
--- a/src/rdf_storage_virtuoso.c
+++ b/src/rdf_storage_virtuoso.c
@@ -596,7 +596,6 @@ rdf2node(librdf_storage *storage, librdf_storage_virtuoso_connection *handle,
case VIRTUOSO_DV_TIMESTAMP_OBJ: /* ? what is this */
return NULL;
- break;
case VIRTUOSO_DV_IRI_ID:
node = librdf_new_node_from_literal(storage->world,
--
2.33.0

View File

@ -1,13 +1,17 @@
Name: redland Name: redland
Version: 1.0.17 Version: 1.0.17
Release: 17 Release: 20
Summary: RDF iprovids support for the Resource Description Framework. Summary: RDF iprovids support for the Resource Description Framework.
License: LGPLv2+ or ASL 2.0 License: LGPLv2+ or ASL 2.0
URL: http://librdf.org/ URL: http://librdf.org/
Source0: http://download.librdf.org/source/%{name}-%{version}.tar.gz Source0: http://download.librdf.org/source/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-unreachable-codes-break-after-return-mostly.patch
Patch6000: 0001-Add-Wunreachable-code.patch
BuildRequires: curl-devel gcc-c++ libdb-devel libtool-ltdl-devel libxml2-devel >= 2.4.0 mysql-devel BuildRequires: curl-devel gcc-c++ libdb-devel libtool-ltdl-devel libxml2-devel >= 2.4.0 mysql-devel
BuildRequires: perl-interpreter postgresql-devel raptor2-devel rasqal-devel >= 0.9.26 sqlite-devel BuildRequires: perl-interpreter postgresql-devel raptor2-devel rasqal-devel >= 0.9.26
BuildRequires: mariadb-connector-c-devel sqlite-devel libpq-devel
Obsoletes: redland-virtuoso < 1.0.17-8 Obsoletes: redland-virtuoso < 1.0.17-8
@ -18,7 +22,7 @@ support for the Resource Description Framework (RDF).
%package devel %package devel
Summary: Libraries when using redland to do some developments Summary: Libraries when using redland to do some developments
Provides: %{name}-static = %{version}-%{release} Provides: %{name}-static = %{version}-%{release}
Obsoletes %{name}-static = %{version}-%{release} Obsoletes: %{name}-static = %{version}-%{release}
%description devel %description devel
Libs when developing with Redland. Libs when developing with Redland.
@ -45,8 +49,10 @@ sed -i -e 's|"/lib /usr/lib|"%{_lib} %{_libdir}|' configure
%build %build
%define distrooptions --with-sqlite --with-mysql --with-postgresql
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
%configure --enable-release --disable-static --with-virtuoso=no %configure --enable-release --disable-static --with-virtuoso=no %{distrooptions}
%make_build %make_build
@ -63,8 +69,8 @@ make check
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%post -p /sbin/ldconfig libs %post -p /sbin/ldconfig devel
%postun -p /sbin/ldconfig libs %postun -p /sbin/ldconfig devel
%post -p /sbin/ldconfig mysql %post -p /sbin/ldconfig mysql
%postun -p /sbin/ldconfig mysql %postun -p /sbin/ldconfig mysql
@ -109,5 +115,14 @@ make check
%changelog %changelog
* Tue Jul 18 2023 caofei <caofei@xfusion.com> - 1.0.17-20
- Add -Wunreachable-code
* Tue Jan 17 2023 caofei <caofei@xfusion.com> - 1.0.17-19
- Fix unreachable codes - break after return mostly
* Sat Mar 5 2022 duyiwei <duyiwei@kylinos.cn> - 1.0.17-18
- add support of sqlite and mariadb
* Sun Dec 1 2019 jiaxiya <jiaxiyajiaxiya@168.com> - 1.0.17-17 * Sun Dec 1 2019 jiaxiya <jiaxiyajiaxiya@168.com> - 1.0.17-17
- Package init - Package init

4
redland.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: dajobe/redland-bindings
tag_prefix: redland-bindings_
seperator: _