summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-08-10 15:57:09 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-08-10 15:57:09 +0000
commit760ccbabfbec67d80c3bdac9c0803ecf7d1742b6 (patch)
treea8cbb70fbf1d1aab7eb24310d70be94dee292453 /libs/pbd
parent69ca705286383df96b337cc93428f95bd7623345 (diff)
add -Wpointer-arith -Wcast-qual -Wcast-align and others to compile flags, and fix const cast warnings generated by new flags
git-svn-id: svn://localhost/ardour2/branches/3.0@13124 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/locale_guard.cc2
-rw-r--r--libs/pbd/pbd/xml++.h4
-rw-r--r--libs/pbd/xml++.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/libs/pbd/locale_guard.cc b/libs/pbd/locale_guard.cc
index 30fdeadeba..3b8fa7132e 100644
--- a/libs/pbd/locale_guard.cc
+++ b/libs/pbd/locale_guard.cc
@@ -23,7 +23,7 @@ LocaleGuard::~LocaleGuard ()
setlocale (LC_NUMERIC, old);
if (old) {
- free ((char*)old);
+ free (const_cast<char*>(old));
}
}
diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h
index 9c3782e3c2..86b05c4d91 100644
--- a/libs/pbd/pbd/xml++.h
+++ b/libs/pbd/pbd/xml++.h
@@ -98,8 +98,8 @@ public:
const XMLPropertyList& properties() const { return _proplist; }
XMLProperty* property(const char*);
XMLProperty* property(const std::string&);
- const XMLProperty* property(const char* n) const { return ((XMLNode*)this)->property(n); }
- const XMLProperty* property(const std::string& n) const { return ((XMLNode*)this)->property(n); }
+ const XMLProperty* property(const char* n) const { return const_cast<XMLNode*>(this)->property(n); }
+ const XMLProperty* property(const std::string& n) const { return const_cast<XMLNode*>(this)->property(n); }
XMLProperty* add_property(const char* name, const std::string& value);
XMLProperty* add_property(const char* name, const char* value = "");
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc
index 3046f971ab..6554bed9ee 100644
--- a/libs/pbd/xml++.cc
+++ b/libs/pbd/xml++.cc
@@ -131,7 +131,7 @@ XMLTree::read_buffer(const string& buffer)
delete _root;
_root = 0;
- doc = xmlParseMemory((char*)buffer.c_str(), buffer.length());
+ doc = xmlParseMemory(const_cast<char*>(buffer.c_str()), buffer.length());
if (!doc) {
return false;
}