Kaydet (Commit) 127d842c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix liborcus warnings

Change-Id: I6811e7d451c96d5e52e152e693b1c4739be308dc
üst f006e75f
--- 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
{
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment