]> git.mxchange.org Git - simgear.git/commitdiff
warning fixes
authortorsten <torsten>
Thu, 20 Aug 2009 09:00:12 +0000 (09:00 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 23 Aug 2009 19:37:02 +0000 (21:37 +0200)
simgear/scene/material/Effect.cxx
simgear/scene/material/makeEffect.cxx

index 496d64f4f599477b87fc426a361b0dc5a5257bd6..4415fe35e71c8c908dc03eab95f9221cfe648ec4 100644 (file)
@@ -633,6 +633,8 @@ struct UniformBuilder :public PassAttributeBuilder
         case Uniform::SAMPLER_3D:
             uniform->set(valProp->getValue<int>());
             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<SGExpressionb*>(parser.read(predProp
                                                            ->getChild(0)));
index 0cdad0d957f7d349785457b15c03991cb697af79..b2d37ff21e8e683c964829aa85969a99e6b098aa 100644 (file)
@@ -139,20 +139,20 @@ Effect* makeEffect(SGPropertyNode* prop,
 {
     // Give default names to techniques and passes
     vector<SGPropertyNode_ptr> 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<string>(i));
         vector<SGPropertyNode_ptr> 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<string>(j));
             vector<SGPropertyNode_ptr> 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),