summaryrefslogtreecommitdiff
path: root/liborcus
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-07 17:04:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-07 17:07:37 +0200
commit127d842cbb41db987ac5d03ca78520a32b6fb206 (patch)
tree201b29f8699a22308554b22e3e866c34d528050b /liborcus
parentf006e75f1876bf7e6249352092d0ed7e7a5be20f (diff)
Fix liborcus warnings
Change-Id: I6811e7d451c96d5e52e152e693b1c4739be308dc
Diffstat (limited to 'liborcus')
-rw-r--r--liborcus/liborcus_0.1.0-warnings.patch62
-rw-r--r--liborcus/makefile.mk3
2 files changed, 64 insertions, 1 deletions
diff --git a/liborcus/liborcus_0.1.0-warnings.patch b/liborcus/liborcus_0.1.0-warnings.patch
new file mode 100644
index 000000000000..a7e796af3975
--- /dev/null
+++ b/liborcus/liborcus_0.1.0-warnings.patch
@@ -0,0 +1,62 @@
+--- misc/liborcus_0.1.0/src/liborcus/pstring.cpp 2012-09-07 06:00:35.000000000 +0200
++++ misc/build/liborcus_0.1.0/src/liborcus/pstring.cpp 2012-09-07 16:56:14.000000000 +0200
+@@ -57,25 +57,25 @@
+
+ pstring pstring::intern(const char* str, size_t n)
+ {
+- ::boost::mutex::scoped_lock(interned_strings.mtx);
++ ::boost::mutex::scoped_lock lock(interned_strings.mtx);
+ return interned_strings.store.intern(str, n);
+ }
+
+ void pstring::intern::dispose()
+ {
+- ::boost::mutex::scoped_lock(interned_strings.mtx);
++ ::boost::mutex::scoped_lock lock(interned_strings.mtx);
+ interned_strings.store.clear();
+ }
+
+ size_t pstring::intern::size()
+ {
+- ::boost::mutex::scoped_lock(interned_strings.mtx);
++ ::boost::mutex::scoped_lock lock(interned_strings.mtx);
+ return interned_strings.store.size();
+ }
+
+ void pstring::intern::dump()
+ {
+- ::boost::mutex::scoped_lock(interned_strings.mtx);
++ ::boost::mutex::scoped_lock lock(interned_strings.mtx);
+ interned_strings.store.dump();
+ }
+
+--- misc/liborcus_0.1.0/src/liborcus/xml_map_tree.cpp 2012-09-07 06:00:35.000000000 +0200
++++ misc/build/liborcus_0.1.0/src/liborcus/xml_map_tree.cpp 2012-09-07 16:59:23.000000000 +0200
+@@ -55,15 +55,14 @@
+ {
+ const char* mp_char;
+ const char* mp_end;
+- size_t m_size;
+ public:
+- xpath_parser(const char* p, size_t n) : mp_char(p), mp_end(p+n), m_size(n)
++ xpath_parser(const char* p, size_t n) : mp_char(p), mp_end(p+n)
+ {
+ if (!n)
+- xml_map_tree::xpath_error("empty path");
++ throw xml_map_tree::xpath_error("empty path");
+
+ if (*p != '/')
+- xml_map_tree::xpath_error("first character must be '/'.");
++ throw xml_map_tree::xpath_error("first character must be '/'.");
+
+ ++mp_char;
+ }
+@@ -414,7 +413,7 @@
+ {
+ // Make sure the root element's names are the same.
+ if (mp_root->name != name)
+- xpath_error("path begins with inconsistent root level name.");
++ throw xpath_error("path begins with inconsistent root level name.");
+ }
+ else
+ {
diff --git a/liborcus/makefile.mk b/liborcus/makefile.mk
index 8d921092ffef..fd04605c4fd0 100644
--- a/liborcus/makefile.mk
+++ b/liborcus/makefile.mk
@@ -35,7 +35,8 @@ TARGET=orcus
TARFILE_NAME=liborcus_0.1.0
TARFILE_MD5=46d9f4cf8b145c21ce1056e116d2ce71
-PATCH_FILES=
+PATCH_FILES=liborcus_0.1.0-warnings.patch
+ # -Werror,-Wunused-variable -Werror,-Wunused-private-field
.IF "$(GUI)$(COM)"=="WNTMSC"