Fix several compiler warnings

* variable 'xAngle' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
* variable 'yAngle' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
* variable 'zAngle' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
* unused variable 'base' [-Werror,-Wunused-variable]
* unused variable 'extrude' [-Werror,-Wunused-variable]
This commit is contained in:
wmayer
2024-06-11 11:01:52 +02:00
committed by wwmayer
parent 86e07e9181
commit d88253c2a1
2 changed files with 3 additions and 5 deletions

View File

@@ -175,7 +175,7 @@ void ConstraintTransform::handleChangedPropertyName(Base::XMLReader& reader,
const char* propName)
{
if (strcmp(propName, "X_rot") == 0) {
double xAngle;
double xAngle {};
if (strcmp(typeName, "App::PropertyFloat") == 0) {
App::PropertyFloat X_rotProperty;
X_rotProperty.Restore(reader);
@@ -189,7 +189,7 @@ void ConstraintTransform::handleChangedPropertyName(Base::XMLReader& reader,
anglesToRotation(xAngle, 0, 0);
}
else if (strcmp(propName, "Y_rot") == 0) {
double yAngle;
double yAngle {};
if (strcmp(typeName, "App::PropertyFloat") == 0) {
App::PropertyFloat Y_rotProperty;
Y_rotProperty.Restore(reader);
@@ -203,7 +203,7 @@ void ConstraintTransform::handleChangedPropertyName(Base::XMLReader& reader,
anglesToRotation(0, yAngle, 0);
}
else if (strcmp(propName, "Z_rot") == 0) {
double zAngle;
double zAngle {};
if (strcmp(typeName, "App::PropertyFloat") == 0) {
App::PropertyFloat Z_rotProperty;
Z_rotProperty.Restore(reader);