yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10000
[Branch ~yade-pkg/yade/git-trunk] Rev 3702: Fix some compilation warnings (GCC).
------------------------------------------------------------
revno: 3702
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Mon 2013-09-23 19:39:59 +0200
message:
Fix some compilation warnings (GCC).
modified:
lib/import/STLReader.hpp
pkg/dem/FlowEngine.cpp
pkg/dem/Ip2_ElastMat.cpp
pkg/dem/SpherePack.cpp
pkg/dem/Tetra.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'lib/import/STLReader.hpp'
--- lib/import/STLReader.hpp 2013-05-29 09:48:51 +0000
+++ lib/import/STLReader.hpp 2013-09-23 17:39:59 +0000
@@ -111,20 +111,19 @@
vector<Vrtx> vcs;
set<pair<int,int> > egs;
- size_t ret;
/* Read a single facet from an ASCII .STL file */
while(!feof(fp))
{
float n[3];
Vrtx v[3];
- ret=fscanf(fp, "%*s %*s %f %f %f\n", &n[0], &n[1], &n[2]);
- ret=fscanf(fp, "%*s %*s");
- ret=fscanf(fp, "%*s %f %f %f\n", &v[0][0], &v[0][1], &v[0][2]);
- ret=fscanf(fp, "%*s %f %f %f\n", &v[1][0], &v[1][1], &v[1][2]);
- ret=fscanf(fp, "%*s %f %f %f\n", &v[2][0], &v[2][1], &v[2][2]);
- ret=fscanf(fp, "%*s"); // end loop
- ret=fscanf(fp, "%*s"); // end facet
+ fscanf(fp, "%*s %*s %f %f %f\n", &n[0], &n[1], &n[2]);
+ fscanf(fp, "%*s %*s");
+ fscanf(fp, "%*s %f %f %f\n", &v[0][0], &v[0][1], &v[0][2]);
+ fscanf(fp, "%*s %f %f %f\n", &v[1][0], &v[1][1], &v[1][2]);
+ fscanf(fp, "%*s %f %f %f\n", &v[2][0], &v[2][1], &v[2][2]);
+ fscanf(fp, "%*s"); // end loop
+ fscanf(fp, "%*s"); // end facet
if(feof(fp)) break;
int vid[3];
=== modified file 'pkg/dem/FlowEngine.cpp'
--- pkg/dem/FlowEngine.cpp 2013-08-30 13:27:06 +0000
+++ pkg/dem/FlowEngine.cpp 2013-09-23 17:39:59 +0000
@@ -395,7 +395,6 @@
typedef typename Solver::element_type Flow;
typedef typename Flow::Finite_vertices_iterator Finite_vertices_iterator;
typedef typename Solver::element_type Flow;
- typedef typename Flow::Finite_cells_iterator Finite_cells_iterator;
Finite_vertices_iterator vertices_end = flow->T[flow->currentTes].Triangulation().finite_vertices_end();
CGT::Vecteur Zero(0,0,0);
=== modified file 'pkg/dem/Ip2_ElastMat.cpp'
--- pkg/dem/Ip2_ElastMat.cpp 2013-09-08 11:12:42 +0000
+++ pkg/dem/Ip2_ElastMat.cpp 2013-09-23 17:39:59 +0000
@@ -46,7 +46,7 @@
Real Vb = mat2->poisson;
interaction->phys = shared_ptr<NormShearPhys>(new NormShearPhys());
const shared_ptr<NormShearPhys>& phys = YADE_PTR_CAST<NormShearPhys>(interaction->phys);
- Real Kn, Ks;
+ Real Kn=0.0, Ks=0.0;
GenericSpheresContact* geom=dynamic_cast<GenericSpheresContact*>(interaction->geom.get());
if (geom) {
Real Ra,Rb;//Vector3r normal;
=== modified file 'pkg/dem/SpherePack.cpp'
--- pkg/dem/SpherePack.cpp 2013-08-23 15:21:20 +0000
+++ pkg/dem/SpherePack.cpp 2013-09-23 17:39:59 +0000
@@ -410,7 +410,7 @@
for(size_t j=0; j<packSize; j++){ if(pow(pack[j].r+r,2) >= (pack[j].c-c).squaredNorm()) { overlap=true; break; } }
} else {
for(size_t j=0; j<packSize; j++){
- Vector3r dr;
+ Vector3r dr=Vector3r::Zero();
for(int axis=0; axis<2; axis++) dr[axis]=min(cellWrapRel(c[axis],pack[j].c[axis],pack[j].c[axis]+size[axis]),cellWrapRel(pack[j].c[axis],c[axis],c[axis]+size[axis]));
if(pow(pack[j].r+r,2)>= dr.squaredNorm()){ overlap=true; break; }
}
=== modified file 'pkg/dem/Tetra.cpp'
--- pkg/dem/Tetra.cpp 2013-09-11 21:43:09 +0000
+++ pkg/dem/Tetra.cpp 2013-09-23 17:39:59 +0000
@@ -148,7 +148,6 @@
{
for (int i=0; i<6; i++) {
const Segment& sa = sA[i];
- bool b[4];
const Triangle& ta0 = tA[stMap[i][0]];
const Triangle& ta1 = tA[stMap[i][1]];
for (int j=0; j<6; j++) {
@@ -222,8 +221,6 @@
bool b21 = do_intersect(ta,s21);
bool b22 = do_intersect(ta,s22);
if ( !((b20 && b21) || (b21 && b22) || (b22 && b20) ) ) { continue; }
- int si = ppsMap[j][k];
- const Segment& sb = sB[si];
int l,m;
for (l=0; l<3; l++) {
if (l!=j && l!=k) { break; }
@@ -231,8 +228,6 @@
for (m=l+1; m<4; m++) {
if (m!=j && m!=k) { break; }
}
- const Point& p3 = pB[l];
- const Point& p4 = pB[m];
const Segment& s13 = sB[ppsMap[j][l]];
const Segment& s14 = sB[ppsMap[j][m]];
const Segment& s23 = sB[ppsMap[k][l]];