Commit ba4b78fe authored by Christophe Geuzaine's avatar Christophe Geuzaine

fix compiler warnings

parent 4c4e31d9
Pipeline #3034 passed with stage
in 69 minutes and 52 seconds
......@@ -1072,13 +1072,13 @@ GMSH_API void gmsh::model::mesh::setNodes(
if(!numNodeTags){ // this is allowed: we will assign new tags
numNodes = coord.size() / 3;
}
if(coord.size() != 3 * numNodes) {
if((int)coord.size() != 3 * numNodes) {
Msg::Error("Wrong number of coordinates");
throw 2;
}
bool param = false;
if(parametricCoord.size()) {
if(parametricCoord.size() != dim * numNodes) {
if((int)parametricCoord.size() != dim * numNodes) {
Msg::Error("Wrong number of parametric coordinates");
throw 2;
}
......@@ -1086,7 +1086,7 @@ GMSH_API void gmsh::model::mesh::setNodes(
}
// delete nodes and elements; this will also delete the model mesh cache
ge->deleteMesh();
for(unsigned int i = 0; i < numNodes; i++) {
for(int i = 0; i < numNodes; i++) {
int n = (numNodeTags ? nodeTags[i] : -1);
double x = coord[3 * i];
double y = coord[3 * i + 1];
......
......@@ -133,12 +133,13 @@ bool pointInsideParametricDomain(std::vector<SPoint2> &bnd, SPoint2 &p,
void trueBoundary(GFace *gf, std::vector<SPoint2> &bnd, int debug)
{
FILE *view_t;
FILE *view_t = 0;
if(debug) {
char name[245];
sprintf(name, "trueBoundary%d.pos", gf->tag());
view_t = Fopen(name, "w");
fprintf(view_t, "View \"True Boundary\"{\n");
if(view_t)
fprintf(view_t, "View \"True Boundary\"{\n");
}
std::vector<GEdge *> edg = gf->edges();
std::set<GEdge *> edges(edg.begin(), edg.end());
......@@ -155,7 +156,7 @@ void trueBoundary(GFace *gf, std::vector<SPoint2> &bnd, int debug)
double xi = r.low() + (r.high() - r.low()) * t;
p[k] = ge->reparamOnFace(gf, xi, i);
if(k > 0) {
if(debug) {
if(view_t) {
fprintf(view_t, "SL(%g,%g,%g,%g,%g,%g){1,1};\n", p[k - 1].x(),
p[k - 1].y(), 0.0, p[k].x(), p[k].y(), 0.0);
}
......@@ -165,7 +166,7 @@ void trueBoundary(GFace *gf, std::vector<SPoint2> &bnd, int debug)
}
}
}
if(debug) {
if(view_t) {
fprintf(view_t, "};\n");
fclose(view_t);
}
......@@ -2546,7 +2547,7 @@ static bool meshGeneratorPeriodic(GFace *gf, int RECUR_ITER,
std::vector<GEdge *> eds = gf->edges();
edgesNotRecovered.clear();
for(size_t i = 0; i < eds.size(); i++) {
const int NN = eds[i]->lines.size() ? 1 : 0;
const unsigned int NN = eds[i]->lines.size() ? 1 : 0;
for(size_t j = 0; j < NN; j++) {
MVertex *v1 = eds[i]->lines[j]->getVertex(0);
MVertex *v2 = eds[i]->lines[j]->getVertex(1);
......
......@@ -140,7 +140,7 @@ public:
_vwgt[i] = 1;
}
else{
_vwgt[i] = (_element[i]->getDim() == _dim ? 1 : 0);
_vwgt[i] = (_element[i]->getDim() == (int)_dim ? 1 : 0);
}
}
}
......
......@@ -1075,7 +1075,7 @@ void PViewDataGModel::sendToServer(const std::string &name)
}
int num = v->getNum();
exp.push_back(num);
for(int step = 0; step < _steps.size(); step++){
for(unsigned int step = 0; step < _steps.size(); step++){
for(int k = 0; k < numComp; k++){
double data = _steps[step]->getData(i)[k];
exp.push_back(data);
......
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