aboutsummaryrefslogtreecommitdiff
path: root/xsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-03-19 09:28:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-03-19 09:28:37 +0200
commit4b3b5d47300f27dfda25caa9deff3f5ab1560cc8 (patch)
treedeb7e1c36bd53f221e669bdd98eb45a45ef5d363 /xsd
parent2ff19bd5b0ab8bb13a94177ca6c172ae42e7d534 (diff)
Resolve Clang, GCC warnings
Diffstat (limited to 'xsd')
-rw-r--r--xsd/cxx/elements.cxx6
-rw-r--r--xsd/cxx/parser/element-validation-source.cxx25
-rw-r--r--xsd/cxx/parser/state-processor.cxx2
3 files changed, 16 insertions, 17 deletions
diff --git a/xsd/cxx/elements.cxx b/xsd/cxx/elements.cxx
index 5ee1f28..c72eb13 100644
--- a/xsd/cxx/elements.cxx
+++ b/xsd/cxx/elements.cxx
@@ -9,6 +9,7 @@
#include <memory>
#include <sstream>
#include <fstream>
+#include <cassert>
#include <iostream>
using std::wcerr;
@@ -861,7 +862,7 @@ namespace CXX
}
else
{
- unsigned int count;
+ unsigned int count (0);
unsigned int tmp[4];
if (u < 0x800)
@@ -891,7 +892,10 @@ namespace CXX
case 1:
{
tmp[0] = u | utf8_first_char_mask[count];
+ break;
}
+ default:
+ assert (false);
}
for (unsigned int j (0); j < count; ++j)
diff --git a/xsd/cxx/parser/element-validation-source.cxx b/xsd/cxx/parser/element-validation-source.cxx
index 1bc506a..7c3f492 100644
--- a/xsd/cxx/parser/element-validation-source.cxx
+++ b/xsd/cxx/parser/element-validation-source.cxx
@@ -1037,8 +1037,8 @@ namespace CXX
Traversal::Compositor,
Context
{
- CompositorPre (Context& c, SemanticGraph::Complex& type)
- : Context (c), type_ (type)
+ CompositorPre (Context& c)
+ : Context (c)
{
}
@@ -1065,9 +1065,6 @@ namespace CXX
<< "vd.state = 0;"
<< "vd.count = 0;";
}
-
- private:
- SemanticGraph::Complex& type_;
};
@@ -1253,8 +1250,8 @@ namespace CXX
Traversal::Compositor,
Context
{
- CompositorEndElement (Context& c, SemanticGraph::Complex& type)
- : Context (c), type_ (type)
+ CompositorEndElement (Context& c)
+ : Context (c)
{
}
@@ -1276,9 +1273,6 @@ namespace CXX
<< "vs.size--;" // pop
<< endl;
}
-
- private:
- SemanticGraph::Complex& type_;
};
@@ -1288,8 +1282,8 @@ namespace CXX
Traversal::Compositor,
Context
{
- CompositorPost (Context& c, SemanticGraph::Complex& type)
- : Context (c), type_ (type), particle_name_ (c)
+ CompositorPost (Context& c)
+ : Context (c), particle_name_ (c)
{
}
@@ -1366,7 +1360,6 @@ namespace CXX
}
private:
- SemanticGraph::Complex& type_;
ParticleName particle_name_;
};
@@ -1499,7 +1492,7 @@ namespace CXX
}
{
- CompositorEndElement t (*this, c);
+ CompositorEndElement t (*this);
t.dispatch (comp);
}
@@ -1518,7 +1511,7 @@ namespace CXX
<< endl;
{
- CompositorPre t (*this, c);
+ CompositorPre t (*this);
t.dispatch (comp);
}
@@ -1566,7 +1559,7 @@ namespace CXX
}
{
- CompositorPost t (*this, c);
+ CompositorPost t (*this);
t.dispatch (c.contains_compositor ().compositor ());
}
diff --git a/xsd/cxx/parser/state-processor.cxx b/xsd/cxx/parser/state-processor.cxx
index 8664886..b15c18f 100644
--- a/xsd/cxx/parser/state-processor.cxx
+++ b/xsd/cxx/parser/state-processor.cxx
@@ -23,6 +23,7 @@ namespace CXX
{
typedef vector<SemanticGraph::Particle*> Particles;
+ /*
void
print (Particles const& p)
{
@@ -46,6 +47,7 @@ namespace CXX
wcerr << endl;
}
+ */
//
//