FreeCAD: Compiler warning fixes
This commit is contained in:
committed by
Kacper Donat
parent
b170b8e27c
commit
21c07cabc5
@@ -48,7 +48,7 @@ static void print_curve(const CCurve& c)
|
||||
#if defined SIZEOF_SIZE_T && SIZEOF_SIZE_T == 4
|
||||
printf("number of vertices = %d\n", nvertices);
|
||||
#elif defined(_WIN32)
|
||||
printf("number of vertices = %Iu\n", nvertices);
|
||||
printf("number of vertices = %zu\n", nvertices);
|
||||
#else
|
||||
printf("number of vertices = %lu\n", nvertices);
|
||||
#endif
|
||||
|
||||
@@ -1485,7 +1485,7 @@ void readResults(std::ifstream& ifstr,
|
||||
std::vector<double> scaValues;
|
||||
std::vector<int> nodes;
|
||||
int countNodes = 0;
|
||||
int countScaPos;
|
||||
size_t countScaPos;
|
||||
// result block could have both vector/matrix and scalar components
|
||||
// save each scalars entity in his own array
|
||||
auto scalarPos = identifyScalarEntities(entityTypes);
|
||||
@@ -1542,7 +1542,7 @@ void readResults(std::ifstream& ifstr,
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (const std::out_of_range& ex) {
|
||||
catch (const std::out_of_range&) {
|
||||
Base::Console().Warning("Invalid node: %d\n", node);
|
||||
}
|
||||
++countNodes;
|
||||
|
||||
@@ -194,7 +194,7 @@ unsigned long MeshKernel::AddFacets(const std::vector<MeshFacet>& rclFAry, bool
|
||||
{
|
||||
// Build map of edges of the referencing facets we want to append
|
||||
#ifdef FC_DEBUG
|
||||
unsigned long countPoints = CountPoints();
|
||||
[[maybe_unused]] unsigned long countPoints = CountPoints();
|
||||
#endif
|
||||
|
||||
// if the manifold check shouldn't be done then just add all faces
|
||||
|
||||
@@ -2300,7 +2300,7 @@ void PropertySheet::getLinksTo(std::vector<App::ObjectIdentifier>& identifiers,
|
||||
const auto [docObj, depsList] = *it;
|
||||
for (auto& [depName, paths] : depsList) {
|
||||
if (!subname) {
|
||||
identifiers.emplace_back(owner, cellName.toString().c_str());
|
||||
identifiers.emplace_back(owner, cellName.toString());
|
||||
break;
|
||||
}
|
||||
if (std::any_of(paths.begin(),
|
||||
@@ -2314,7 +2314,7 @@ void PropertySheet::getLinksTo(std::vector<App::ObjectIdentifier>& identifiers,
|
||||
return (sobjT.getSubObject() == subObject
|
||||
&& sobjT.getOldElementName() == subElement);
|
||||
})) {
|
||||
identifiers.emplace_back(owner, cellName.toString().c_str());
|
||||
identifiers.emplace_back(owner, cellName.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1715,7 +1715,7 @@ TopoDS_Face GeometryUtils::makePerforatedFace(FacePtr bigCheese, const std::vec
|
||||
try {
|
||||
faceShape = Part::FaceMakerCheese::makeFace(cheeseIngredients);
|
||||
}
|
||||
catch (const Standard_Failure &e) {
|
||||
catch (const Standard_Failure&) {
|
||||
Base::Console().Warning("Area - could not make holes in face\n");
|
||||
return flippedFace;
|
||||
}
|
||||
|
||||
@@ -744,6 +744,8 @@ long int TechDraw::mapGeometryTypeToDimType(long int dimType, DimensionGeometry
|
||||
return DrawViewDimension::Angle;
|
||||
case DimensionGeometry::isAngle3Pt:
|
||||
return DrawViewDimension::Angle3Pt;
|
||||
default:
|
||||
break; // For all other cases, return dimType
|
||||
}
|
||||
} else if (geometry2d != DimensionGeometry::isViewReference) {
|
||||
switch (geometry2d) {
|
||||
@@ -757,6 +759,8 @@ long int TechDraw::mapGeometryTypeToDimType(long int dimType, DimensionGeometry
|
||||
return DrawViewDimension::Angle;
|
||||
case DimensionGeometry::isAngle3Pt:
|
||||
return DrawViewDimension::Angle3Pt;
|
||||
default:
|
||||
break; // For all other cases, return dimType
|
||||
}
|
||||
}
|
||||
return dimType;
|
||||
|
||||
Reference in New Issue
Block a user