Compare commits
11 Commits
15cd0573a7
...
f3531e9594
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3531e9594 | ||
|
|
9561e162fd | ||
|
|
0052d23959 | ||
|
|
4023f97cc3 | ||
|
|
c11e7eb74a | ||
|
|
8419195095 | ||
|
|
ac5da2611a | ||
|
|
42d5813ec6 | ||
|
|
3f63f6df15 | ||
|
|
faabb95a05 | ||
|
|
b75fc24371 |
24
0001-Add-Wunreachable-code.patch
Normal file
24
0001-Add-Wunreachable-code.patch
Normal 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
|
||||
|
||||
123
0001-Fix-unreachable-codes-break-after-return-mostly.patch
Normal file
123
0001-Fix-unreachable-codes-break-after-return-mostly.patch
Normal 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
|
||||
|
||||
27
redland.spec
27
redland.spec
@ -1,13 +1,17 @@
|
||||
Name: redland
|
||||
Version: 1.0.17
|
||||
Release: 17
|
||||
Release: 20
|
||||
Summary: RDF iprovids support for the Resource Description Framework.
|
||||
License: LGPLv2+ or ASL 2.0
|
||||
URL: http://librdf.org/
|
||||
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: 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
|
||||
|
||||
@ -18,7 +22,7 @@ support for the Resource Description Framework (RDF).
|
||||
%package devel
|
||||
Summary: Libraries when using redland to do some developments
|
||||
Provides: %{name}-static = %{version}-%{release}
|
||||
Obsoletes %{name}-static = %{version}-%{release}
|
||||
Obsoletes: %{name}-static = %{version}-%{release}
|
||||
%description devel
|
||||
Libs when developing with Redland.
|
||||
|
||||
@ -45,8 +49,10 @@ sed -i -e 's|"/lib /usr/lib|"%{_lib} %{_libdir}|' configure
|
||||
|
||||
|
||||
%build
|
||||
%define distrooptions --with-sqlite --with-mysql --with-postgresql
|
||||
|
||||
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
|
||||
|
||||
@ -63,8 +69,8 @@ make check
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%post -p /sbin/ldconfig libs
|
||||
%postun -p /sbin/ldconfig libs
|
||||
%post -p /sbin/ldconfig devel
|
||||
%postun -p /sbin/ldconfig devel
|
||||
|
||||
%post -p /sbin/ldconfig mysql
|
||||
%postun -p /sbin/ldconfig mysql
|
||||
@ -109,5 +115,14 @@ make check
|
||||
|
||||
|
||||
%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
|
||||
- Package init
|
||||
|
||||
4
redland.yaml
Normal file
4
redland.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: dajobe/redland-bindings
|
||||
tag_prefix: redland-bindings_
|
||||
seperator: _
|
||||
Loading…
x
Reference in New Issue
Block a user