From: ageay Date: Tue, 29 Oct 2013 10:20:04 +0000 (+0000) Subject: Warning hunting. X-Git-Tag: V7_3_0a1~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bb5567eeffcce602935dbee0eca25b1f6afad17c;p=modules%2Fmed.git Warning hunting. --- diff --git a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx index 3e15f5255..851d63734 100644 --- a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx +++ b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx @@ -1102,10 +1102,9 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(std::ve if(!(*it)) throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords : null instance in the first element of input vector !"); std::vector ncs(a.size()); - int nbOfCells=(*it)->getNumberOfCells(); + (*it)->getNumberOfCells();//to check that all is OK const DataArrayDouble *coords=(*it)->getCoords(); const INTERP_KERNEL::CellModel *cm=&((*it)->getCellModel()); - int nbNodesPerCell=(*it)->getNumberOfNodesPerCell(); ncs[0]=(*it)->getNodalConnectivity(); it++; for(int i=1;it!=a.end();i++,it++) @@ -1660,7 +1659,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh3D() const const int *d1(d1Arr->begin()); MEDCouplingAutoRefCountObjectPtr d2Arr(DataArrayInt::New()),di2Arr(DataArrayInt::New()),rd2Arr(DataArrayInt::New()),rdi2Arr(DataArrayInt::New()); MEDCouplingAutoRefCountObjectPtr faces(thisu->buildDescendingConnectivity(d2Arr,di2Arr,rd2Arr,rdi2Arr)); thisu=0; - const int *d2(d2Arr->begin()),*rd2(rd2Arr->begin()),*rdi2(rdi2Arr->begin()); + const int *d2(d2Arr->begin()),*rdi2(rdi2Arr->begin()); MEDCouplingAutoRefCountObjectPtr edgesBaryArr(edges->getBarycenterAndOwner()),facesBaryArr(faces->getBarycenterAndOwner()),baryArr(getBarycenterAndOwner()); const int nbOfNodes(getNumberOfNodes()),offset0(nbOfNodes+faces->getNumberOfCells()),offset1(offset0+edges->getNumberOfCells()); edges=0; faces=0; @@ -1732,7 +1731,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const const int *revNod(revNodArr->begin()),*revNodI(revNodIArr->begin()),*nodal(_conn->begin()); MEDCouplingAutoRefCountObjectPtr d2Arr(DataArrayInt::New()),di2Arr(DataArrayInt::New()),rd2Arr(DataArrayInt::New()),rdi2Arr(DataArrayInt::New()); MEDCouplingAutoRefCountObjectPtr edges(thisu->buildDescendingConnectivity(d2Arr,di2Arr,rd2Arr,rdi2Arr)); thisu=0; - const int *d2(d2Arr->begin()),*rd2(rd2Arr->begin()),*rdi2(rdi2Arr->begin()); + const int *d2(d2Arr->begin()),*rdi2(rdi2Arr->begin()); MEDCouplingAutoRefCountObjectPtr edgesBaryArr(edges->getBarycenterAndOwner()),baryArr(getBarycenterAndOwner()); const int nbOfNodes(getNumberOfNodes()),offset0(nbOfNodes+edges->getNumberOfCells()); edges=0; @@ -2434,7 +2433,6 @@ void MEDCoupling1DGTUMesh::renumberCells(const int *old2NewBg, bool check) // for(int i=0;i > objs(a.size()); std::vector ncs(a.size()),ncis(a.size()); - int nbOfCells=(*it)->getNumberOfCells(); + (*it)->getNumberOfCells();//to check that all is OK const DataArrayDouble *coords=(*it)->getCoords(); const INTERP_KERNEL::CellModel *cm=&((*it)->getCellModel()); bool tmp; diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index e721d1423..097e3a788 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -240,7 +240,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::nodeToCellDiscretization() const MEDCouplingAutoRefCountObjectPtr nsp(new MEDCouplingFieldDiscretizationP0); ret->setDiscretization(nsp); const MEDCouplingMesh *m(getMesh());//m is non empty thanks to checkCoherency call - int nbCells(m->getNumberOfCells()),nbNodes(m->getNumberOfNodes()); + int nbCells(m->getNumberOfCells()); std::vector arrs(getArrays()); std::size_t sz(arrs.size()); std::vector< MEDCouplingAutoRefCountObjectPtr > outArrsSafe(sz); std::vector outArrs(sz); diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index 062a6b753..96160edb7 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -358,8 +358,6 @@ namespace ParaMEDMEM template void MemArray::reserve(std::size_t newNbOfElements) { - if(newNbOfElements<0) - throw INTERP_KERNEL::Exception("MemArray::reAlloc : request for negative length of data !"); if(_nb_of_elem_alloc==newNbOfElements) return ; T *pointer=(T*)malloc(newNbOfElements*sizeof(T));