[libxml++] Fix several compiler warnings
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml++] Fix several compiler warnings
- Date: Sat, 27 Mar 2010 21:49:09 +0000 (UTC)
commit 276542f090f542e6bd167fea75edf74d35a9a5f4
Author: David King <amigadave amigadave com>
Date: Sat Mar 27 22:43:58 2010 +0100
Fix several compiler warnings
* examples/dom_build/main.cc:
* examples/dtdvalidation/main.cc:
* examples/import_node/main.cc:
* examples/sax_exception/main.cc:
* examples/sax_exception/my_parser.cc:
* examples/sax_parser/main.cc:
* examples/sax_parser/my_parser.cc:
* examples/sax_parser_build_dom/svgparser.cc:
* examples/sax_parser_entities/myparser.cc:
* examples/textreader/main.cc:
* libxml++/parsers/textreader.cc: Comment out unused parameters and
variables.
* libxml++/parsers/saxparser.cc: Fill in missing fields of
xmlSAXHandler struct.
ChangeLog | 20 ++++++++++++++++++++
examples/dom_build/main.cc | 2 +-
examples/dtdvalidation/main.cc | 4 ++--
examples/import_node/main.cc | 2 +-
examples/sax_exception/main.cc | 2 +-
examples/sax_exception/myparser.cc | 2 +-
examples/sax_parser/main.cc | 4 ++--
examples/sax_parser/myparser.cc | 2 +-
examples/sax_parser_build_dom/svgparser.cc | 2 +-
examples/sax_parser_entities/myparser.cc | 2 +-
examples/textreader/main.cc | 3 +--
libxml++/parsers/saxparser.cc | 21 +++++++++++++--------
libxml++/parsers/textreader.cc | 2 +-
13 files changed, 46 insertions(+), 22 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e975a77..107f763 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2010-03-27 David King <amigadave amigadave com>
+
+ Fix several compiler warnings
+
+ * examples/dom_build/main.cc:
+ * examples/dtdvalidation/main.cc:
+ * examples/import_node/main.cc:
+ * examples/sax_exception/main.cc:
+ * examples/sax_exception/my_parser.cc:
+ * examples/sax_parser/main.cc:
+ * examples/sax_parser/my_parser.cc:
+ * examples/sax_parser_build_dom/svgparser.cc:
+ * examples/sax_parser_entities/myparser.cc:
+ * examples/textreader/main.cc:
+ * libxml++/parsers/textreader.cc: Comment out unused parameters and
+ variables.
+
+ * libxml++/parsers/saxparser.cc: Fill in missing fields of
+ xmlSAXHandler struct.
+
2010-03-27 David King <davidk openismus com>
Refactor build system
diff --git a/examples/dom_build/main.cc b/examples/dom_build/main.cc
index 3c33923..f29ac41 100644
--- a/examples/dom_build/main.cc
+++ b/examples/dom_build/main.cc
@@ -29,7 +29,7 @@
int
-main(int argc, char* argv[])
+main(int /* argc */, char** /* argv */)
{
#ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
try
diff --git a/examples/dtdvalidation/main.cc b/examples/dtdvalidation/main.cc
index 882aaea..5294f3f 100644
--- a/examples/dtdvalidation/main.cc
+++ b/examples/dtdvalidation/main.cc
@@ -37,7 +37,7 @@ int main(int argc, char* argv[])
dtdfilepath = "example.dtd";
xmlpp::Document document;
- xmlpp::Element* nodeRoot = document.create_root_node("incorrect");
+ /* xmlpp::Element* nodeRoot = */document.create_root_node("incorrect");
#ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
try
@@ -59,7 +59,7 @@ int main(int argc, char* argv[])
}
#endif //LIBXMLCPP_EXCEPTIONS_ENABLED
- xmlpp::Element* nodeRoot2 = document.create_root_node("example");
+ /* xmlpp::Element* nodeRoot2 = */document.create_root_node("example");
xmlpp::Element * child = document.get_root_node()->add_child("examplechild");
child->set_attribute("id", "an_id");
child->add_child("child_of_child");
diff --git a/examples/import_node/main.cc b/examples/import_node/main.cc
index c838b55..019338d 100644
--- a/examples/import_node/main.cc
+++ b/examples/import_node/main.cc
@@ -7,7 +7,7 @@
using namespace xmlpp;
using namespace std;
-int main (int argc, char *argv[])
+int main (int /* argc */, char** /* argv */)
{
#ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
try
diff --git a/examples/sax_exception/main.cc b/examples/sax_exception/main.cc
index 959fdc6..547616f 100644
--- a/examples/sax_exception/main.cc
+++ b/examples/sax_exception/main.cc
@@ -30,7 +30,7 @@
#include "myparser.h"
#include <iostream>
-int main(int argc, char* argv[])
+int main(int /* argc */, char** /* argv */)
{
MySaxParser parser;
diff --git a/examples/sax_exception/myparser.cc b/examples/sax_exception/myparser.cc
index 317dd31..b66b928 100644
--- a/examples/sax_exception/myparser.cc
+++ b/examples/sax_exception/myparser.cc
@@ -88,7 +88,7 @@ void MySaxParser::on_start_element(const Glib::ustring& name,
#endif //LIBXMLCPP_EXCEPTIONS_ENABLED
}
-void MySaxParser::on_end_element(const Glib::ustring& name)
+void MySaxParser::on_end_element(const Glib::ustring& /* name */)
{
std::cout << "on_end_element()" << std::endl;
}
diff --git a/examples/sax_parser/main.cc b/examples/sax_parser/main.cc
index ec6625d..194fa0f 100644
--- a/examples/sax_parser/main.cc
+++ b/examples/sax_parser/main.cc
@@ -59,8 +59,8 @@ main(int argc, char* argv[])
//std::cout << "Incremental SAX Parser:" << std:endl;
std::ifstream is(filepath.c_str());
- char buffer[64];
- const size_t buffer_size = sizeof(buffer) / sizeof(char);
+ /* char buffer[64];
+ const size_t buffer_size = sizeof(buffer) / sizeof(char); */
//Parse the file:
MySaxParser parser;
diff --git a/examples/sax_parser/myparser.cc b/examples/sax_parser/myparser.cc
index 060abf8..b12591a 100644
--- a/examples/sax_parser/myparser.cc
+++ b/examples/sax_parser/myparser.cc
@@ -72,7 +72,7 @@ void MySaxParser::on_start_element(const Glib::ustring& name,
}
}
-void MySaxParser::on_end_element(const Glib::ustring& name)
+void MySaxParser::on_end_element(const Glib::ustring& /* name */)
{
std::cout << "on_end_element()" << std::endl;
}
diff --git a/examples/sax_parser_build_dom/svgparser.cc b/examples/sax_parser_build_dom/svgparser.cc
index e338f98..6c0b6a2 100644
--- a/examples/sax_parser_build_dom/svgparser.cc
+++ b/examples/sax_parser_build_dom/svgparser.cc
@@ -148,7 +148,7 @@ void Parser::on_start_element(const Glib::ustring& name,
}
}
-void Parser::on_end_element(const Glib::ustring& name)
+void Parser::on_end_element(const Glib::ustring& /* name */)
{
// This causes the next child elements to be added to the sibling, not this node.
m_context.pop();
diff --git a/examples/sax_parser_entities/myparser.cc b/examples/sax_parser_entities/myparser.cc
index 0044e44..16f3b1e 100644
--- a/examples/sax_parser_entities/myparser.cc
+++ b/examples/sax_parser_entities/myparser.cc
@@ -54,7 +54,7 @@ void MySaxParser::on_start_element(const Glib::ustring& name,
}
}
-void MySaxParser::on_end_element(const Glib::ustring& name)
+void MySaxParser::on_end_element(const Glib::ustring& /* name */)
{
std::cout << "on_end_element()" << std::endl;
}
diff --git a/examples/textreader/main.cc b/examples/textreader/main.cc
index c404952..05fbae0 100644
--- a/examples/textreader/main.cc
+++ b/examples/textreader/main.cc
@@ -42,8 +42,7 @@ std::ostream & operator<<(std::ostream & o, indent const & in)
return o;
}
- int
-main(int argc, char* argv[])
+int main(int /* argc */, char** /* argv */)
{
#ifdef LIBXMLCPP_EXCEPTIONS_ENABLED
try
diff --git a/libxml++/parsers/saxparser.cc b/libxml++/parsers/saxparser.cc
index 7d72f1d..7c5d240 100644
--- a/libxml++/parsers/saxparser.cc
+++ b/libxml++/parsers/saxparser.cc
@@ -69,7 +69,12 @@ SaxParser::SaxParser(bool use_get_entity)
SaxParserCallback::fatal_error, // fatalError
0, // getParameterEntity
SaxParserCallback::cdata_block, // cdataBlock
- 0 // externalSubset
+ 0, // externalSubset
+ 0, // initialized
+ 0, // private
+ 0, // startElementNs
+ 0, // endElementNs
+ 0, // serror
};
*sax_handler_ = temp;
}
@@ -97,27 +102,27 @@ void SaxParser::on_end_document()
{
}
-void SaxParser::on_start_element(const Glib::ustring& name, const AttributeList& attributes)
+void SaxParser::on_start_element(const Glib::ustring& /* name */, const AttributeList& /* attributes */)
{
}
-void SaxParser::on_end_element(const Glib::ustring& name)
+void SaxParser::on_end_element(const Glib::ustring& /* name */)
{
}
-void SaxParser::on_characters(const Glib::ustring& text)
+void SaxParser::on_characters(const Glib::ustring& /* text */)
{
}
-void SaxParser::on_comment(const Glib::ustring& text)
+void SaxParser::on_comment(const Glib::ustring& /* text */)
{
}
-void SaxParser::on_warning(const Glib::ustring& text)
+void SaxParser::on_warning(const Glib::ustring& /* text */)
{
}
-void SaxParser::on_error(const Glib::ustring& text)
+void SaxParser::on_error(const Glib::ustring& /* text */)
{
}
@@ -134,7 +139,7 @@ void SaxParser::on_fatal_error(const Glib::ustring&)
}
#endif //LIBXMLCPP_EXCEPTIONS_ENABLED
-void SaxParser::on_cdata_block(const Glib::ustring& text)
+void SaxParser::on_cdata_block(const Glib::ustring& /* text */)
{
}
diff --git a/libxml++/parsers/textreader.cc b/libxml++/parsers/textreader.cc
index acca61d..a0b71c6 100644
--- a/libxml++/parsers/textreader.cc
+++ b/libxml++/parsers/textreader.cc
@@ -360,7 +360,7 @@ void TextReader::setup_exceptions()
}
}
-void TextReader::on_libxml_error(void* arg, const char* msg, int severity, void* locator)
+void TextReader::on_libxml_error(void* arg, const char* msg, int severity, void* /* locator */)
{
TextReader* ths = (TextReader*)arg;
ths->severity_ = severity;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]