Commit 7aa35c47 authored by Heinrich Schindler's avatar Heinrich Schindler
Browse files

Merge branch 'fix-warnings' into 'master'

Fix compiler warnings

See merge request !253
parents a4ddaa9d 18641fa2
Pipeline #3168710 passed with stage
in 5 minutes and 29 seconds
......@@ -3011,7 +3011,7 @@ int InitChargingUp(void) {
{
int nvert;
Point3D polynode[4];
int nearestele;
int nearestele = ElementBgn[nearestprim];
double distele = 1.0e6,
mindistele = 1.0e6; // absurdly high value
......@@ -3760,7 +3760,7 @@ int InitChargingUp(void) {
{
int nvert;
Point3D polynode[4];
int nearestele = 1;
int nearestele = ElementBgn[nearestprim];
double distele = 1.0e6,
mindistele = 1.0e6; // absurdly high value
......
......@@ -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