Compare commits

..

No commits in common. "f3531e959418d023bdbeb205ec370dad82138da6" and "15cd0573a76f02fe9b42fadb3689e3fac4dfe5b5" have entirely different histories.

4 changed files with 6 additions and 172 deletions

View File

@ -1,24 +0,0 @@
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

@ -1,123 +0,0 @@
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,17 +1,13 @@
Name: redland Name: redland
Version: 1.0.17 Version: 1.0.17
Release: 20 Release: 17
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 BuildRequires: perl-interpreter postgresql-devel raptor2-devel rasqal-devel >= 0.9.26 sqlite-devel
BuildRequires: mariadb-connector-c-devel sqlite-devel libpq-devel
Obsoletes: redland-virtuoso < 1.0.17-8 Obsoletes: redland-virtuoso < 1.0.17-8
@ -22,7 +18,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.
@ -49,10 +45,8 @@ 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 %{distrooptions} %configure --enable-release --disable-static --with-virtuoso=no
%make_build %make_build
@ -69,8 +63,8 @@ make check
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%post -p /sbin/ldconfig devel %post -p /sbin/ldconfig libs
%postun -p /sbin/ldconfig devel %postun -p /sbin/ldconfig libs
%post -p /sbin/ldconfig mysql %post -p /sbin/ldconfig mysql
%postun -p /sbin/ldconfig mysql %postun -p /sbin/ldconfig mysql
@ -115,14 +109,5 @@ 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

View File

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