silenced many more warnings

This commit is contained in:
Jez Higgins 2010-01-11 09:02:17 +00:00
parent 953e46ba92
commit 3dc2f255c7
13 changed files with 71 additions and 68 deletions

View file

@ -19,8 +19,8 @@ public:
{
} // SortHandler
virtual void startElement(const std::string& namespaceURI,
const std::string& localName,
virtual void startElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& qName,
const SAX::Attributes<std::string>& atts)
{
@ -29,12 +29,12 @@ public:
static const char* DataTypes[] = { "text", "number", 0 };
static const char* SortOrder[] = { "ascending", "descending", 0 };
static const char* CaseOrder[] = { "upper-first", "lower-first", 0 };
static const ValueRule rules[] = { { "select", false, "." },
{ "lang", false, 0 },
static const ValueRule rules[] = { { "select", false, ".", 0 },
{ "lang", false, 0, 0 },
{ "data-type", false, "text", DataTypes },
{ "order", false, "ascending", SortOrder },
{ "case-order", false, "upper-first", CaseOrder },
{ 0, false, 0 } };
{ 0, false, 0, 0 } };
std::map<std::string, std::string> attr = gatherAttributes(qName, atts, rules);
@ -57,9 +57,9 @@ public:
throw SAX::SAXException("xsl:sort can not contain elements");
} // startElement
virtual void endElement(const std::string& namespaceURI,
const std::string& localName,
const std::string& qName)
virtual void endElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& /* qName */)
{
sortee_.add_sort(sort_);
context_.pop();

View file

@ -34,16 +34,16 @@ public:
} // characters
protected:
virtual Template* createContainer(const std::string& namespaceURI,
const std::string& localName,
virtual Template* createContainer(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& qName,
const SAX::Attributes<std::string>& atts)
{
static const ValueRule rules[] = { { "match", false, 0 },
{ "mode", false, 0 },
{ "name", false, 0 },
{ "priority", false, 0 },
{ 0, false, 0} };
static const ValueRule rules[] = { { "match", false, 0, 0 },
{ "mode", false, 0, 0 },
{ "name", false, 0, 0 },
{ "priority", false, 0, 0 },
{ 0, false, 0, 0 } };
std::map<std::string, std::string> attributes = gatherAttributes(qName, atts, rules);
const std::string& match = attributes["match"];
@ -112,9 +112,9 @@ protected:
} // createChild
public:
virtual void endElement(const std::string& namespaceURI,
const std::string& localName,
const std::string& qName)
virtual void endElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& /* qName */)
{
context().stylesheet().add_template(container());
context().pop();

View file

@ -17,15 +17,15 @@ public:
{
} // TextHandler
virtual void startElement(const std::string& namespaceURI,
const std::string& localName,
virtual void startElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& qName,
const SAX::Attributes<std::string>& atts)
{
if(text_ == 0)
{
static const ValueRule rules[] = { { "disable-output-escaping", false, No, AllowedYesNo },
{ 0, false, 0} };
{ 0, false, 0, 0 } };
text_ = new Text(gatherAttributes(qName, atts, rules)["disable-output-escaping"] == Yes);
return;
} // if(text_ == 0)
@ -33,9 +33,9 @@ public:
throw SAX::SAXException(qName + " can not contain elements");
} // startElement
virtual void endElement(const std::string& namespaceURI,
const std::string& localName,
const std::string& qName)
virtual void endElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& /* qName */)
{
text_->set(buffer_);
context_.parentContainer().add_item(text_);

View file

@ -18,16 +18,16 @@ public:
{
} // ValueOfHandler
virtual void startElement(const std::string& namespaceURI,
const std::string& localName,
virtual void startElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& qName,
const SAX::Attributes<std::string>& atts)
{
if(valueOf_ == 0)
{
static const ValueRule rules[] = { { "select", true, 0 },
static const ValueRule rules[] = { { "select", true, 0, 0 },
{ "disable-output-escaping", false, No, AllowedYesNo },
{ 0, false, 0} };
{ 0, false, 0, 0 } };
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
valueOf_ = new ValueOf(context_.xpath_expression(attrs["select"]),
@ -38,9 +38,9 @@ public:
throw SAX::SAXException(qName + " can not contain elements");
} // startElement
virtual void endElement(const std::string& namespaceURI,
const std::string& localName,
const std::string& qName)
virtual void endElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& /* qName */)
{
context_.parentContainer().add_item(valueOf_);
context_.pop();

View file

@ -87,7 +87,7 @@ std::map<std::string, std::string> gatherAttributes(const std::string& parentEle
}
return results;
}; // validateAttributes
} // validateAttributes
} // namespace XSLT
} // namespace Arabica

View file

@ -29,14 +29,14 @@ public:
} // VariableHandler
protected:
virtual VType* createContainer(const std::string& namespaceURI,
const std::string& localName,
virtual VType* createContainer(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& qName,
const SAX::Attributes<std::string>& atts)
{
static const ValueRule rules[] = { { "name", true, 0 },
{ "select", false, 0 },
{ 0, false, 0} };
static const ValueRule rules[] = { { "name", true, 0, 0 },
{ "select", false, 0, 0 },
{ 0, false, 0, 0 } };
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
@ -78,9 +78,9 @@ public:
{
} // VariableHandler
virtual void endElement(const std::string& namespaceURI,
const std::string& localName,
const std::string& qName)
virtual void endElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& /* qName */)
{
this->context().stylesheet().add_variable(this->container());
this->context().pop();

View file

@ -19,9 +19,9 @@ public:
{
} // WithParamHandler
virtual void endElement(const std::string& namespaceURI,
const std::string& localName,
const std::string& qName)
virtual void endElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& /* qName */)
{
paramee_.add_with_param(container());
context().pop();

View file

@ -84,21 +84,22 @@ public:
stream_(stream),
disable_output_escaping_(false),
in_cdata_(false),
empty_(false),
seen_root_(true),
out_again_(false),
indent_(-1),
empty_(false)
out_again_(false)
{
} // StreamSink
StreamSink(const StreamSink& rhs) :
stream_(rhs.stream_),
disable_output_escaping_(rhs.disable_output_escaping_),
seen_root_(rhs.seen_root_),
settings_(rhs.settings_),
indent_(rhs.indent_),
in_cdata_(rhs.in_cdata_),
empty_(false),
out_again_(rhs.out_again_)
seen_root_(rhs.seen_root_),
indent_(rhs.indent_),
out_again_(rhs.out_again_),
settings_(rhs.settings_)
{
} // StreamSink
@ -123,7 +124,7 @@ protected:
} // do_end_document
void do_start_element(const std::string& qName,
const std::string& namespaceURI,
const std::string& /* namespaceURI */,
const SAX::Attributes<std::string>& atts)
{
if(!seen_root_)
@ -144,7 +145,8 @@ protected:
empty_ = true;
} // do_start_element
void do_end_element(const std::string& qName, const std::string& namespaceURI)
void do_end_element(const std::string& qName,
const std::string& /* namespaceURI */)
{
if(!seen_root_)
do_decl("");
@ -305,9 +307,9 @@ private:
bool in_cdata_;
bool empty_;
bool seen_root_;
Settings settings_;
int indent_;
bool out_again_;
Settings settings_;
bool operator==(const StreamSink&) const;
StreamSink& operator=(const StreamSink&);

View file

@ -145,8 +145,8 @@ private:
Arabica::XPath::XPathExpressionPtr<std::string> datatype_;
Arabica::XPath::XPathExpressionPtr<std::string> order_;
Arabica::XPath::XPathExpressionPtr<std::string> caseorder_;
ExecutionContext* context_;
Sort* sub_sort_;
ExecutionContext* context_;
sortFn sort_fn_;
Sort& operator=(const Sort&);

View file

@ -59,9 +59,9 @@ public:
oops(qName);
} // startElement
virtual void endElement(const std::string& namespaceURI,
const std::string& localName,
const std::string& qName)
virtual void endElement(const std::string& /* namespaceURI */,
const std::string& /* localName */,
const std::string& /* qName */)
{
} // endElement
@ -79,7 +79,7 @@ public:
} // endDocument
private:
void startStylesheet(const std::string& namespaceURI,
void startStylesheet(const std::string& /* namespaceURI */,
const std::string& localName,
const std::string& qName,
const SAX::Attributes<std::string>& atts)
@ -87,11 +87,11 @@ private:
if(localName != "stylesheet" && localName != "transform")
throw SAX::SAXException("Top-level element must be 'stylesheet' or 'transform'.");
static const ValueRule rules[] = { { "version", true, 0 },
{ "extension-element-prefixes", false, 0 },
{ "exclude-result-prefixes", false, 0 },
{ "id", false, 0 },
{ 0, false, 0 } };
static const ValueRule rules[] = { { "version", true, 0, 0 },
{ "extension-element-prefixes", false, 0, 0 },
{ "exclude-result-prefixes", false, 0, 0 },
{ "id", false, 0, 0 },
{ 0, false, 0, 0 } };
std::map<std::string, std::string> attributes = gatherAttributes(qName, atts, rules);
if(attributes["version"] != StylesheetConstant::Version())
throw SAX::SAXException("I'm only a poor version 1.0 XSLT Transformer.");

View file

@ -14,8 +14,8 @@ class Template : public ItemContainer
public:
Template(const std::string& name,
const std::string& mode,
const std::string& priority,
const Precedence& precedence) :
const std::string& /* priority */,
const Precedence& precedence) :
matches_(),
name_(name),
mode_(mode),

View file

@ -24,7 +24,8 @@ public:
void set(const std::string& text) { text_ = text; }
virtual void execute(const DOM::Node<std::string>& node, ExecutionContext& context) const
virtual void execute(const DOM::Node<std::string>& /* node */,
ExecutionContext& context) const
{
if(disable_)
context.sink().disableOutputEscaping(true);

View file

@ -27,9 +27,9 @@ public:
virtual const std::string& namespace_uri() const { return namespace_uri_; }
virtual const std::string& name() const { return name_; }
virtual Arabica::XPath::XPathValue<std::string> value(const DOM::Node<std::string>& node,
ExecutionContext& context,
DOMSink& sink) const
virtual Arabica::XPath::XPathValue<std::string> value(const DOM::Node<std::string>& /* node */,
ExecutionContext& /* context */,
DOMSink& /* sink */) const
{
return value_;
} // value