From d9f2965d2ec41a024cf8a6882f0a483d403ce19e Mon Sep 17 00:00:00 2001 From: abn Date: Tue, 22 Sep 2020 09:54:19 +0200 Subject: [PATCH] clang -Wconditional-uninitialized. Some remaining in SWIG generated code. --- src/INTERP_KERNEL/DirectedBoundingBox.cxx | 1 - .../InterpKernelGeo2DQuadraticPolygon.cxx | 10 +++---- src/INTERP_KERNEL/Interpolation3D.hxx | 2 -- src/INTERP_KERNEL/PolygonAlgorithms.txx | 2 +- .../MEDCouplingCartesianAMRMesh.cxx | 2 +- src/MEDCoupling/MEDCouplingUMesh.cxx | 2 +- src/MEDLoader/MEDFileMeshLL.cxx | 6 ++-- src/ParaMEDMEM/MPIAccessDEC.cxx | 8 ++--- .../ParaMEDMEMTest_InterpKernelDEC.cxx | 29 +++++++++---------- ...ParaMEDMEMTest_StructuredCoincidentDEC.cxx | 6 ++-- src/ParaMEDMEMTest/test_MPI_Access_Cancel.cxx | 2 +- src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx | 2 +- .../test_MPI_Access_ISend_IRecv_Length_1.cxx | 4 +-- src/ParaMEDMEMTest/test_MPI_Access_Time_0.cxx | 2 +- src/ParaMEDMEMTest/test_perf.cxx | 8 ++--- 15 files changed, 41 insertions(+), 45 deletions(-) diff --git a/src/INTERP_KERNEL/DirectedBoundingBox.cxx b/src/INTERP_KERNEL/DirectedBoundingBox.cxx index a70db19a4..2f03e8ad4 100644 --- a/src/INTERP_KERNEL/DirectedBoundingBox.cxx +++ b/src/INTERP_KERNEL/DirectedBoundingBox.cxx @@ -28,7 +28,6 @@ #define __AXIS(i) (&_axes[(i)*_dim]) #define __MIN(i) _minmax[i*2] #define __MAX(i) _minmax[i*2+1] -#define __MYID (long(this)%10000) #define __DMP(msg) \ // cout << msg << endl diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index 9df9026a1..b6f888faf 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -540,10 +540,10 @@ void QuadraticPolygon::buildFromCrudeDataArray2(const std::map > >::const_iterator it=idIns1.begin();it!=idIns1.end() && !found;it++) { mcIdType idIn1=(*it).first;//store if needed the cell id in 1 @@ -1089,7 +1089,7 @@ void QuadraticPolygon::ClosePolygons(std::list& pol1Zip, con std::vector& results) { bool directionKnownInPol2=false; - bool directionInPol2; + bool directionInPol2=false; bool needCleaning = false; for(std::list::iterator iter=pol1Zip.begin();iter!=pol1Zip.end();) { diff --git a/src/INTERP_KERNEL/Interpolation3D.hxx b/src/INTERP_KERNEL/Interpolation3D.hxx index 43290d9f5..9592252ba 100755 --- a/src/INTERP_KERNEL/Interpolation3D.hxx +++ b/src/INTERP_KERNEL/Interpolation3D.hxx @@ -40,8 +40,6 @@ namespace INTERP_KERNEL Interpolation3D(const InterpolationOptions& io); template typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method); - private: - SplittingPolicy _splitting_policy; }; } diff --git a/src/INTERP_KERNEL/PolygonAlgorithms.txx b/src/INTERP_KERNEL/PolygonAlgorithms.txx index 1d4adc6c8..17f41408a 100644 --- a/src/INTERP_KERNEL/PolygonAlgorithms.txx +++ b/src/INTERP_KERNEL/PolygonAlgorithms.txx @@ -394,7 +394,7 @@ namespace INTERP_KERNEL int N1, int N2) { int i_loc, i_glob, j1, j1_glob, j2,j2_glob, j3, j3_glob, j4,j4_glob, - i_prev, i_prev_glob, i_next, i_next_glob, nb_prev, sign, idim; + i_prev, i_prev_glob, i_next, i_next_glob, nb_prev=0, sign, idim; const double * Poly1, * Poly2; bool four_neighbours=false; _terminus = N1 < 3 || N2<3; diff --git a/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx b/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx index 808c41083..719fd48d1 100755 --- a/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx @@ -897,7 +897,7 @@ bool FindInflection(const INTERP_KERNEL::BoxSplittingOptions& bso, const Interna { bool cutFound(false); cutPlace=-1;// do not set axisId before to be sure that cutFound was set to true const std::vector< std::pair >& part(patchToBeSplit->getConstPart()); - mcIdType sign,minimumPatchLength(bso.getMinimumPatchLength()); + mcIdType sign=0,minimumPatchLength(bso.getMinimumPatchLength()); const mcIdType dim(patchToBeSplit->getDimension()); std::vector zeroCrossDims(dim,-1); diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index 839051cf1..c022388b4 100755 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -7362,7 +7362,7 @@ void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(mcIdType *begin, mcIdTy nbOfEdgesInFace=std::distance(bgFace,endFace); if(!isPerm[i]) { - bool b; + bool b=false; for(std::size_t j=0;j p1(bgFace[j],bgFace[(j+1)%nbOfEdgesInFace]); diff --git a/src/MEDLoader/MEDFileMeshLL.cxx b/src/MEDLoader/MEDFileMeshLL.cxx index e9d3f2d14..72f4486e5 100644 --- a/src/MEDLoader/MEDFileMeshLL.cxx +++ b/src/MEDLoader/MEDFileMeshLL.cxx @@ -104,7 +104,7 @@ double MeshCls::checkMeshTimeStep(med_idt fid, const std::string& mName, int nst { bool found=false; med_int numdt,numit; - med_float dtt; + med_float dtt=0.0; std::vector< std::pair > p(nstep); for(int i=0;i MEDFileMeshL2::getDirectChildrenWithNull() INTERP_KERNEL::AutoCppPtr MEDFileMeshL2::GetMeshIdFromName(med_idt fid, const std::string& mName, MEDCoupling::MEDCouplingMeshType& meshType, MEDCoupling::MEDCouplingAxisType& axType, int& dt, int& it, std::string& dtunit1) { - med_mesh_type type_maillage; + med_mesh_type type_maillage=MED_UNDEF_MESH_TYPE; char maillage_description[MED_COMMENT_SIZE+1]; char dtunit[MED_LNAME_SIZE+1]; med_int spaceDim,dim; @@ -182,7 +182,7 @@ INTERP_KERNEL::AutoCppPtr MEDFileMeshL2::GetMeshIdFromName( med_sorting_type stype; std::vector ms; med_int nstep; - med_axis_type axistype; + med_axis_type axistype=MED_UNDEF_AXIS_TYPE; for(int i=0;i