fix compiler warnings

This commit is contained in:
Joachim Schoeberl 2023-07-25 19:45:16 +02:00
parent 92902746cb
commit 0752aa7def
2 changed files with 12 additions and 13 deletions

View File

@ -18,7 +18,6 @@ namespace netgen
class TriangleApproximation; class TriangleApproximation;
class TATriangle; class TATriangle;
/** /**
A top level object is an entity to be meshed. A top level object is an entity to be meshed.
I can be either a solid, or one surface patch of a solid. I can be either a solid, or one surface patch of a solid.

View File

@ -245,12 +245,12 @@ int Meshing3 :: ApplyRules
if (rule->GetQuality() < 100) impossible = 0; if (rule->GetQuality() < 100) impossible = 0;
if (testmode) if (testmode)
sprintf (problems.Elem(ri), "Quality not ok"); snprintf (problems.Elem(ri), 255, "Quality not ok");
continue; continue;
} }
if (testmode) if (testmode)
sprintf (problems.Elem(ri), "no mapping found"); snprintf (problems.Elem(ri), 255, "no mapping found");
loktestmode = testmode || rule->TestFlag ('t') || tolerance > 5; loktestmode = testmode || rule->TestFlag ('t') || tolerance > 5;
@ -419,7 +419,7 @@ int Meshing3 :: ApplyRules
if (loktestmode) if (loktestmode)
{ {
(*testout) << "Faces Ok" << endl; (*testout) << "Faces Ok" << endl;
sprintf (problems.Elem(ri), "Faces Ok"); snprintf (problems.Elem(ri), 255, "Faces Ok");
} }
int npok = 1; int npok = 1;
@ -527,7 +527,7 @@ int Meshing3 :: ApplyRules
for (auto pi : pmap) for (auto pi : pmap)
(*testout) << pi << " "; (*testout) << pi << " ";
(*testout) << endl; (*testout) << endl;
sprintf (problems.Elem(ri), "mapping found"); snprintf (problems.Elem(ri), 255, "mapping found");
(*testout) << rule->GetNP(1) << " = " << lfaces.Get(1).GetNP() << endl; (*testout) << rule->GetNP(1) << " = " << lfaces.Get(1).GetNP() << endl;
} }
@ -642,7 +642,7 @@ int Meshing3 :: ApplyRules
if (!rule->ConvexFreeZone()) if (!rule->ConvexFreeZone())
{ {
ok = 0; ok = 0;
sprintf (problems.Elem(ri), "Freezone not convex"); snprintf (problems.Elem(ri), 255, "Freezone not convex");
if (loktestmode) if (loktestmode)
(*testout) << "Freezone not convex" << endl; (*testout) << "Freezone not convex" << endl;
@ -673,7 +673,7 @@ int Meshing3 :: ApplyRules
{ {
(*testout) << "Point " << i (*testout) << "Point " << i
<< " in Freezone" << endl; << " in Freezone" << endl;
sprintf (problems.Elem(ri), snprintf (problems.Elem(ri), 255,
"locpoint %d in Freezone", i); "locpoint %d in Freezone", i);
} }
ok = 0; ok = 0;
@ -787,7 +787,7 @@ int Meshing3 :: ApplyRules
<< lpoints[lfacei.PNum(4)] << lpoints[lfacei.PNum(4)]
<< endl; << endl;
sprintf (problems.Elem(ri), "triangle (%d, %d, %d) in Freezone", snprintf (problems.Elem(ri), 255, "triangle (%d, %d, %d) in Freezone",
int(lfaces.Get(i).PNum(1)), int(lfaces.Get(i).PNum(1)),
int(lfaces.Get(i).PNum(2)), int(lfaces.Get(i).PNum(2)),
int(lfaces.Get(i).PNum(3))); int(lfaces.Get(i).PNum(3)));
@ -830,7 +830,7 @@ int Meshing3 :: ApplyRules
<< lfaces.Get(i).PNum(2) << " - " << lfaces.Get(i).PNum(2) << " - "
<< lfaces.Get(i).PNum(3) << endl; << lfaces.Get(i).PNum(3) << endl;
sprintf (problems.Elem(ri), "triangle (%d, %d, %d) in Freezone", snprintf (problems.Elem(ri), 255, "triangle (%d, %d, %d) in Freezone",
int (lfaces.Get(i).PNum(1)), int (lfaces.Get(i).PNum(1)),
int (lfaces.Get(i).PNum(2)), int (lfaces.Get(i).PNum(2)),
int (lfaces.Get(i).PNum(3))); int (lfaces.Get(i).PNum(3)));
@ -857,7 +857,7 @@ int Meshing3 :: ApplyRules
if (loktestmode) if (loktestmode)
{ {
(*testout) << "Rule ok" << endl; (*testout) << "Rule ok" << endl;
sprintf (problems.Elem(ri), "Rule ok, err = %f", err); snprintf (problems.Elem(ri), 255, "Rule ok, err = %f", err);
} }
@ -922,7 +922,7 @@ int Meshing3 :: ApplyRules
{ {
if (loktestmode) if (loktestmode)
{ {
sprintf (problems.Elem(ri), "Orientation wrong"); snprintf (problems.Elem(ri), 255, "Orientation wrong");
(*testout) << "Orientation wrong ("<< n*v3 << ")" << endl; (*testout) << "Orientation wrong ("<< n*v3 << ")" << endl;
} }
ok = 0; ok = 0;
@ -939,7 +939,7 @@ int Meshing3 :: ApplyRules
{ {
(*testout) << "Newpoint " << lpoints.Get(pmap.Get(i)) (*testout) << "Newpoint " << lpoints.Get(pmap.Get(i))
<< " outside convex hull" << endl; << " outside convex hull" << endl;
sprintf (problems.Elem(ri), "newpoint outside convex hull"); snprintf (problems.Elem(ri), 255, "newpoint outside convex hull");
} }
ok = 0; ok = 0;
@ -1014,7 +1014,7 @@ int Meshing3 :: ApplyRules
{ {
ok = 0; ok = 0;
if (loktestmode) if (loktestmode)
sprintf (problems.Elem(ri), "oldlen < newlen"); snprintf (problems.Elem(ri), 255, "oldlen < newlen");
} }
} }