diff --git a/simgear/props/condition.cxx b/simgear/props/condition.cxx index b7efa7e3..53922ce9 100644 --- a/simgear/props/condition.cxx +++ b/simgear/props/condition.cxx @@ -312,9 +312,8 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode * right, const S return SGComparisonCondition::LESS_THAN; else if (v1 > v2) return SGComparisonCondition::GREATER_THAN; - else - return SGComparisonCondition::EQUALS; - break; + + return SGComparisonCondition::EQUALS; } case props::INT: return doComp(left->getIntValue(), right->getIntValue(), @@ -342,9 +341,8 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode * right, const S return SGComparisonCondition::LESS_THAN; else if (v1 > v2) return SGComparisonCondition::GREATER_THAN; - else - return SGComparisonCondition::EQUALS; - break; + + return SGComparisonCondition::EQUALS; } default: throw sg_exception("condition: unrecognized node type in comparison"); diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index 8ee640ae..08216a23 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -2045,7 +2045,6 @@ T SGPropertyNode::getValue(typename std::enable_if(make_string()); - break; default: // avoid compiler warning break; } diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index e1d8ba70..9bc9fddd 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -300,10 +300,9 @@ read_value(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, if (minClip > SGMiscd::min(SGLimitsd::min(), -SGLimitsd::max()) || maxClip < SGLimitsd::max()) value = new SGClipExpression(value, minClip, maxClip); - - return value; } - return 0; + + return value; } //////////////////////////////////////////////////////////////////////// diff --git a/simgear/scene/util/SGImageUtils.cxx b/simgear/scene/util/SGImageUtils.cxx index 58aad3b2..0d49ec7e 100644 --- a/simgear/scene/util/SGImageUtils.cxx +++ b/simgear/scene/util/SGImageUtils.cxx @@ -1907,37 +1907,26 @@ namespace { case GL_DEPTH_COMPONENT: return chooseReader(dataType); - break; case GL_LUMINANCE: return chooseReader(dataType); - break; case GL_RED: return chooseReader(dataType); - break; case GL_ALPHA: return chooseReader(dataType); - break; case GL_LUMINANCE_ALPHA: return chooseReader(dataType); - break; case GL_RGB: return chooseReader(dataType); - break; case GL_RGBA: return chooseReader(dataType); - break; case GL_BGR: return chooseReader(dataType); - break; case GL_BGRA: return chooseReader(dataType); - break; case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: return &ColorReader::read; - break; default: return 0L; - break; } } } @@ -2057,34 +2046,24 @@ namespace { case GL_DEPTH_COMPONENT: return chooseWriter(dataType); - break; case GL_LUMINANCE: return chooseWriter(dataType); - break; case GL_RED: return chooseWriter(dataType); - break; case GL_ALPHA: return chooseWriter(dataType); - break; case GL_LUMINANCE_ALPHA: return chooseWriter(dataType); - break; case GL_RGB: return chooseWriter(dataType); - break; case GL_RGBA: return chooseWriter(dataType); - break; case GL_BGR: return chooseWriter(dataType); - break; case GL_BGRA: return chooseWriter(dataType); - break; default: return 0L; - break; } } }