Salome HOME
fight warnings, c++17. additional corrections++
[modules/smesh.git] / src / StdMeshers / StdMeshers_Cartesian_3D.cxx
index 0d6ec3591a46959b1f387d46a079b657fb089a8c..029aed72cebae23e1e22982967d424ba54e7753f 100644 (file)
@@ -2218,6 +2218,8 @@ namespace
     }
 #ifdef _DEBUG_
     _cellID = cellID;
+#else
+    (void)cellID; // unused in release mode
 #endif
   }
 
@@ -2556,7 +2558,7 @@ namespace
         case 3: // at a corner
         {
           _Node& node = _hexNodes[ subEntity - SMESH_Block::ID_FirstV ];
-          if ( node.Node() > 0 )
+          if ( node.Node() != 0 )
           {
             if ( node._intPoint )
               node._intPoint->Add( _eIntPoints[ iP ]->_faceIDs, _eIntPoints[ iP ]->_node );
@@ -3489,7 +3491,7 @@ namespace
         continue;
 
       // perform intersection
-      E_IntersectPoint* eip, *vip;
+      E_IntersectPoint* eip, *vip = 0; // todo: vip must be explicitly initialized to avoid warning (see below)
       for ( int iDirZ = 0; iDirZ < 3; ++iDirZ )
       {
         GridPlanes& planes = pln[ iDirZ ];
@@ -3590,7 +3592,7 @@ namespace
             vip = _grid->Add( ip );
           if ( isInternal && !sameV )
             vip->_faceIDs.push_back( _grid->PseudoIntExtFaceID() );
-          if ( !addIntersection( vip, hexes, ijk, d000 ) && !sameV )
+          if ( !addIntersection( vip, hexes, ijk, d000 ) && !sameV ) // todo: vip must be explicitly initialized to avoid warning (see above)
             _grid->Remove( vip );
           ip._shapeID = edgeID;
         }
@@ -4744,6 +4746,8 @@ namespace
     cout << "BUG: not shared link. IKJ = ( "<< _i << " " << _j << " " << _k << " )" << endl
          << "n1 (" << p1.X() << ", "<< p1.Y() << ", "<< p1.Z() << " )" << endl
          << "n2 (" << p2.X() << ", "<< p2.Y() << ", "<< p2.Z() << " )" << endl;
+#else
+    (void)link; // unused in release mode
 #endif
     return false;
   }
@@ -5394,7 +5398,7 @@ namespace
                   if ( allQuads )
                   {
                     // set side nodes as this: bottom, top, top, ...
-                    int iTop, iBot; // side indices
+                    int iTop = 0, iBot = 0; // side indices
                     for ( int iS = 0; iS < 6; ++iS )
                     {
                       if ( vol->_names[ iS ] == SMESH_Block::ID_Fxy0 )
@@ -5890,7 +5894,7 @@ namespace
                               const int          eventType,
                               SMESH_subMesh*     subMeshOfSolid,
                               SMESH_subMeshEventListenerData* /*data*/,
-                              const SMESH_Hypothesis*         hyp = 0)
+                              const SMESH_Hypothesis*         /*hyp*/ = 0)
     {
       if ( eventType == SMESH_subMesh::COMPUTE_EVENT )
       {