From: torsten Date: Thu, 20 Aug 2009 09:00:12 +0000 (+0000) Subject: warning fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f043f3d4f9c60847eeefe4113a458410d40515e3;p=simgear.git warning fixes --- diff --git a/simgear/scene/material/Effect.cxx b/simgear/scene/material/Effect.cxx index 496d64f4..4415fe35 100644 --- a/simgear/scene/material/Effect.cxx +++ b/simgear/scene/material/Effect.cxx @@ -633,6 +633,8 @@ struct UniformBuilder :public PassAttributeBuilder case Uniform::SAMPLER_3D: uniform->set(valProp->getValue()); break; + default: // avoid compiler warning + break; } pass->addUniform(uniform.get()); } @@ -702,7 +704,7 @@ void buildTechnique(Effect* effect, const SGPropertyNode* prop, TechniquePredParser parser; parser.setTechnique(tniq); expression::BindingLayout& layout = parser.getBindingLayout(); - int contextLoc = layout.addBinding("__contextId", expression::INT); + /*int contextLoc = */layout.addBinding("__contextId", expression::INT); SGExpressionb* validExp = dynamic_cast(parser.read(predProp ->getChild(0))); diff --git a/simgear/scene/material/makeEffect.cxx b/simgear/scene/material/makeEffect.cxx index 0cdad0d9..b2d37ff2 100644 --- a/simgear/scene/material/makeEffect.cxx +++ b/simgear/scene/material/makeEffect.cxx @@ -139,20 +139,20 @@ Effect* makeEffect(SGPropertyNode* prop, { // Give default names to techniques and passes vector techniques = prop->getChildren("technique"); - for (int i = 0; i < techniques.size(); ++i) { + for (int i = 0; i < (int)techniques.size(); ++i) { SGPropertyNode* tniqProp = techniques[i].ptr(); if (!tniqProp->hasChild("name")) setValue(tniqProp->getChild("name", 0, true), boost::lexical_cast(i)); vector passes = tniqProp->getChildren("pass"); - for (int j = 0; j < passes.size(); ++j) { + for (int j = 0; j < (int)passes.size(); ++j) { SGPropertyNode* passProp = passes[j].ptr(); if (!passProp->hasChild("name")) setValue(passProp->getChild("name", 0, true), boost::lexical_cast(j)); vector texUnits = passProp->getChildren("texture-unit"); - for (int k = 0; k < texUnits.size(); ++k) { + for (int k = 0; k < (int)texUnits.size(); ++k) { SGPropertyNode* texUnitProp = texUnits[k].ptr(); if (!texUnitProp->hasChild("name")) setValue(texUnitProp->getChild("name", 0, true),