From: ageay Date: Fri, 23 Oct 2009 05:29:39 +0000 (+0000) Subject: -pedantic -Wall compilation X-Git-Tag: V5_1_main_FINAL~303 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec4416123981dbbc3afcd0c274b3fc3bae52d48d;p=tools%2Fmedcoupling.git -pedantic -Wall compilation --- diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index cdccb397f..84178f580 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -71,7 +71,7 @@ void MEDCouplingUMesh::checkCoherency() const throw(INTERP_KERNEL::Exception) throw INTERP_KERNEL::Exception("No mesh dimension specified !"); for(std::set::const_iterator iter=_types.begin();iter!=_types.end();iter++) { - if(INTERP_KERNEL::CellModel::getCellModel(*iter).getDimension()!=_mesh_dim) + if((int)INTERP_KERNEL::CellModel::getCellModel(*iter).getDimension()!=_mesh_dim) { std::ostringstream message; message << "Mesh invalid because dimension is " << _mesh_dim << " and there is presence of cell(s) with type " << (*iter); @@ -350,7 +350,7 @@ void MEDCouplingUMesh::convertToPolyTypes(const std::vector& cellIdsToConve unsigned nbOfFaces=cm.getNumberOfSons2(&connNew[pos+1],lgthOld); int *tmp=new int[nbOfFaces*lgthOld]; int *work=tmp; - for(int j=0;j locMerge; std::insert_iterator< std::set > it(locMerge,locMerge.begin()); std::set_intersection(connOfCell.begin(),connOfCell.end(),fastFinder.begin(),fastFinder.end(),it); - if(locMerge.size()==refLgth && fullyIn || locMerge.size()!=0 && !fullyIn) + if((int)locMerge.size()==refLgth && fullyIn || locMerge.size()!=0 && !fullyIn) cellIdsKept.push_back(i); } return buildPartOfMySelf(&cellIdsKept[0],&cellIdsKept[0]+cellIdsKept.size(),true); diff --git a/src/ParaMEDMEM/BlockTopology.cxx b/src/ParaMEDMEM/BlockTopology.cxx index 90d0cb012..62d683bbf 100644 --- a/src/ParaMEDMEM/BlockTopology.cxx +++ b/src/ParaMEDMEM/BlockTopology.cxx @@ -124,7 +124,7 @@ namespace ParaMEDMEM * values of the different axes. */ BlockTopology::BlockTopology(const ProcessorGroup& group, MEDCouplingCMesh *grid): - _proc_group(&group), _dimension(grid->getSpaceDimension()), _owns_processor_group(false) + _dimension(grid->getSpaceDimension()), _proc_group(&group), _owns_processor_group(false) { vector axis_length(_dimension); _nb_elems=1; @@ -209,7 +209,7 @@ namespace ParaMEDMEM * to \a group will cause an MPI error, while calling from a subset * of \a group will result in a deadlock. */ - BlockTopology::BlockTopology(const ProcessorGroup& group, int nb_elem):_proc_group(&group),_dimension(1),_owns_processor_group(false) + BlockTopology::BlockTopology(const ProcessorGroup& group, int nb_elem):_dimension(1),_proc_group(&group),_owns_processor_group(false) { int* nbelems_per_proc = new int[group.size()]; const MPIProcessorGroup* mpi_group=dynamic_cast(_proc_group); @@ -279,7 +279,7 @@ namespace ParaMEDMEM buffer.push_back(_nb_procs_per_dim[i]); buffer.push_back(_cycle_type[i]); buffer.push_back(_local_array_indices[i].size()); - for (int j=0; j<_local_array_indices[i].size(); j++) + for (int j=0; j<(int)_local_array_indices[i].size(); j++) buffer.push_back(_local_array_indices[i][j]); } @@ -320,7 +320,7 @@ namespace ParaMEDMEM _nb_procs_per_dim[i]=*(ptr_serializer++); _cycle_type[i]=(CYCLE_TYPE)*(ptr_serializer++); _local_array_indices[i].resize(*(ptr_serializer++)); - for (int j=0; j<_local_array_indices[i].size(); j++) + for (int j=0; j<(int)_local_array_indices[i].size(); j++) _local_array_indices[i][j]=*(ptr_serializer++); } set procs; diff --git a/src/ParaMEDMEM/ElementLocator.cxx b/src/ParaMEDMEM/ElementLocator.cxx index 7a7237fb9..a41ccdcbe 100644 --- a/src/ParaMEDMEM/ElementLocator.cxx +++ b/src/ParaMEDMEM/ElementLocator.cxx @@ -41,8 +41,8 @@ namespace ParaMEDMEM : _local_para_field(sourceField), _local_cell_mesh(sourceField.getSupport()->getCellMesh()), _local_face_mesh(sourceField.getSupport()->getFaceMesh()), - _local_group(local_group), - _distant_group(distant_group) + _distant_group(distant_group), + _local_group(local_group) { _union_group = _local_group.fuse(distant_group); _computeBoundingBoxes(); diff --git a/src/ParaMEDMEM/ExplicitMapping.hxx b/src/ParaMEDMEM/ExplicitMapping.hxx index 2cf70a2ae..a79c4429c 100644 --- a/src/ParaMEDMEM/ExplicitMapping.hxx +++ b/src/ParaMEDMEM/ExplicitMapping.hxx @@ -85,10 +85,10 @@ namespace ParaMEDMEM _comm_buffer=new int[_mapping.size()*2]; std::vector offsets(_distant_domains.size()); offsets[0]=0; - for (int i=1; i<_distant_domains.size();i++) + for (int i=1; i<(int)_distant_domains.size();i++) offsets[i]=offsets[i-1]+_numbers[i-1]; - for (int i=0; i< _mapping.size(); i++) + for (int i=0; i<(int)_mapping.size(); i++) { int offset= offsets[_mapping[i].first]; _comm_buffer[offset*2]=idproc; @@ -151,7 +151,7 @@ namespace ParaMEDMEM { _numbers=new int[nbDistantDomains()]; _domains=new int[nbDistantDomains()]; - for (int i=0; i< _mapping.size(); i++) + for (int i=0; i<(int)_mapping.size(); i++) { if ( counts.find(_mapping[i].first) == counts.end()) counts.insert(std::make_pair(_mapping[i].first,1)); diff --git a/src/ParaMEDMEM/ICoCoMEDField.cxx b/src/ParaMEDMEM/ICoCoMEDField.cxx index 05b0d862b..b82eef08e 100644 --- a/src/ParaMEDMEM/ICoCoMEDField.cxx +++ b/src/ParaMEDMEM/ICoCoMEDField.cxx @@ -147,4 +147,4 @@ namespace ICoCo } } -}; +} diff --git a/src/ParaMEDMEM/ICoCoMEDField.hxx b/src/ParaMEDMEM/ICoCoMEDField.hxx index 8ace47149..c46620df9 100644 --- a/src/ParaMEDMEM/ICoCoMEDField.hxx +++ b/src/ParaMEDMEM/ICoCoMEDField.hxx @@ -55,6 +55,6 @@ namespace ICoCo ParaMEDMEM::ParaMESH* _support; ParaMEDMEM::ComponentTopology* _comp_topology; }; -}; +} #endif diff --git a/src/ParaMEDMEM/InterpolationMatrix.cxx b/src/ParaMEDMEM/InterpolationMatrix.cxx index 42b6e8d63..353f715cf 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.cxx +++ b/src/ParaMEDMEM/InterpolationMatrix.cxx @@ -60,13 +60,13 @@ namespace ParaMEDMEM const ProcessorGroup& target_group, const DECOptions& dec_options, const INTERP_KERNEL::InterpolationOptions& interp_options): + INTERP_KERNEL::InterpolationOptions(interp_options), + DECOptions(dec_options), _source_field(source_field), _source_support(source_field->getSupport()->getCellMesh()), _mapping(source_group, target_group, dec_options), _source_group(source_group), - _target_group(target_group), - DECOptions(dec_options), - INTERP_KERNEL::InterpolationOptions(interp_options) + _target_group(target_group) { int nbelems = source_field->getField()->getNumberOfTuples(); _row_offsets.resize(nbelems+1); diff --git a/src/ParaMEDMEM/MxN_Mapping.cxx b/src/ParaMEDMEM/MxN_Mapping.cxx index a74d64089..00845606b 100644 --- a/src/ParaMEDMEM/MxN_Mapping.cxx +++ b/src/ParaMEDMEM/MxN_Mapping.cxx @@ -28,8 +28,7 @@ namespace ParaMEDMEM { MxN_Mapping::MxN_Mapping(const ProcessorGroup& source_group, const ProcessorGroup& target_group,const DECOptions& dec_options) - : _union_group(source_group.fuse(target_group)), - DECOptions(dec_options) + : DECOptions(dec_options),_union_group(source_group.fuse(target_group)) { _access_DEC = new MPIAccessDEC(source_group,target_group,getAsynchronous()); _access_DEC->setTimeInterpolator(getTimeInterpolationMethod()); @@ -109,7 +108,7 @@ namespace ParaMEDMEM recvdispls[i]=_recv_proc_offsets[i]; } vector offsets = _send_proc_offsets; - for (int i=0; i<_sending_ids.size();i++) + for (int i=0; i<(int)_sending_ids.size();i++) { int iproc = _sending_ids[i].first; isendbuf[offsets[iproc]]=_sending_ids[i].second; @@ -167,7 +166,7 @@ namespace ParaMEDMEM //building the buffer of the elements to be sent vector offsets = _send_proc_offsets; - for (int i=0; i<_sending_ids.size();i++) + for (int i=0; i<(int)_sending_ids.size();i++) { int iproc = _sending_ids[i].first; for (int icomp=0; icompgetNumberOfComponents())),_topology(0), + _support(), _has_field_ownership(false), _has_support_ownership(true) { diff --git a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx index 2f0f03b1f..282b6fc1e 100644 --- a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx +++ b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx @@ -79,9 +79,9 @@ namespace ParaMEDMEM StructuredCoincidentDEC::StructuredCoincidentDEC():_topo_source(0),_topo_target(0), - _recv_buffer(0),_send_buffer(0), - _recv_counts(0),_send_counts(0), - _recv_displs(0),_send_displs(0) + _send_counts(0),_recv_counts(0), + _send_displs(0),_recv_displs(0), + _recv_buffer(0),_send_buffer(0) { } @@ -104,8 +104,11 @@ namespace ParaMEDMEM \addtogroup structuredcoincidentdec @{ */ - StructuredCoincidentDEC::StructuredCoincidentDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group):DEC(local_group,distant_group),_topo_source(0),_topo_target(0),_recv_buffer(0),_send_buffer(0), - _recv_counts(0),_send_counts(0),_recv_displs(0),_send_displs(0) + StructuredCoincidentDEC::StructuredCoincidentDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group):DEC(local_group,distant_group), + _topo_source(0),_topo_target(0), + _send_counts(0),_recv_counts(0), + _send_displs(0),_recv_displs(0), + _recv_buffer(0),_send_buffer(0) { }