Commit a97f0274 authored by Heinrich Schindler's avatar Heinrich Schindler
Browse files

Fix compiler warnings (gcc 11)

parent a4ddaa9d
......@@ -120,6 +120,7 @@ bool ComponentElmer::Initialise(const std::string& header,
newNode.x = xnode * funit;
newNode.y = ynode * funit;
newNode.z = znode * funit;
newNode.v = 0.;
m_nodes.push_back(std::move(newNode));
}
......
......@@ -129,6 +129,7 @@ bool ComponentElmer2D::Initialise(const std::string& header,
newNode.x = xnode * funit;
newNode.y = ynode * funit;
newNode.z = znode * funit;
newNode.v = 0.;
m_nodes.push_back(std::move(newNode));
}
......
......@@ -27,7 +27,9 @@ std::string FmtFloat(const double x, const unsigned int width = 15,
std::string FmtInt(const int n, const unsigned int width) {
char buffer[256];
std::snprintf(buffer, width + 1, "%*d", width, n);
if (std::snprintf(buffer, width + 1, "%*d", width, n) < 0.) {
std::cout << " Warning: error formatting integer number " << n << "\n";
}
return std::string(buffer);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment