]> OCCT Git - occt.git/commitdiff
0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable IR-2021-06-25
authorkgv <kgv@opencascade.com>
Thu, 24 Jun 2021 20:07:37 +0000 (23:07 +0300)
committerkgv <kgv@opencascade.com>
Thu, 24 Jun 2021 20:47:45 +0000 (23:47 +0300)
Code has been adjusted to suppress -Wunused-but-set-variable warnings.

DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.

15 files changed:
adm/scripts/wasm_build.bat
samples/webgl/CMakeLists.txt
samples/webgl/main.cpp
src/AdvApp2Var/AdvApp2Var_SysBase.cxx
src/AppCont/AppCont_LeastSquare.cxx
src/BRepTest/BRepTest_BasicCommands.cxx
src/DRAWEXE/CMakeLists.txt
src/Draw/Draw_BasicCommands.cxx
src/GeomPlate/GeomPlate_BuildPlateSurface.cxx
src/IntCurve/IntCurve_IntPolyPolyGen.gxx
src/IntPatch/IntPatch_ImpPrmIntersection.cxx
src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx
src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
src/Standard/Standard_MMgrOpt.cxx
src/XmlMDF/XmlMDF.cxx

index 1284cb7f76e0bb32ba1b38d35ed6cd6e8daa55eb..4e892b5305a31d49b99b8e02a90af3958a53f6d1 100644 (file)
@@ -143,6 +143,10 @@ echo ^</pre^>>> "%aWorkDir%\VERSION.html"
 echo Start building OCCT for %aPlatformAndCompiler%
 echo Start building OCCT for %aPlatformAndCompiler%>> %aLogFile%
 
+echo --->> %aLogFile%
+call emcc --version >> %aLogFile%
+echo --->> %aLogFile%
+
 pushd "%aWorkDir%"
 
 set "aTimeZERO=%TIME%"
index f5f1e8039641d8106eb4144aa32b3f89063c48ac..be2e4647ece4868851c0818919cc42af8f63b3db 100644 (file)
@@ -13,21 +13,20 @@ if (NOT DEFINED SOURCE_MAP_BASE)
 endif()
 
 # customize build
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s MAX_WEBGL_VERSION=2")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --bind")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s SAFE_HEAP=1")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_EXIT_RUNTIME=1")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s TOTAL_MEMORY=16MB")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ABORTING_MALLOC=0")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s FORCE_FILESYSTEM=1")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --preload-file myFile")
 if (NOT "${SOURCE_MAP_BASE}" STREQUAL "")
   set(CMAKE_CXX_FLAGS_DEBUG "-g4 --source-map-base ${SOURCE_MAP_BASE}")
 endif()
+
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s MAX_WEBGL_VERSION=2")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s MODULARIZE=1")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXPORT_NAME='createOccViewerModule'")
+
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
+#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s TOTAL_MEMORY=16MB")
+
+#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --preload-file myFile")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --extern-post-js ${CMAKE_CURRENT_SOURCE_DIR}/occt-webgl-viewer.js")
 
 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
index d39f55e2616e080435e7d8670c3645517abf4e44..abb7ba0326833fcfaa4243650ae1a08d0bbb96ec 100644 (file)
@@ -1,3 +1,24 @@
+// Copyright (c) 2019 OPEN CASCADE SAS
+//
+// This file is part of the examples of the Open CASCADE Technology software library.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
+
 #include <iostream>
 
 #include "WasmOcctView.h"
@@ -23,7 +44,20 @@ EMSCRIPTEN_KEEPALIVE int main()
   Message::DefaultMessenger()->Printers().First()->SetTraceLevel (Message_Trace);
   Handle(Message_PrinterSystemLog) aJSConsolePrinter = new Message_PrinterSystemLog ("webgl-sample", Message_Trace);
   Message::DefaultMessenger()->AddPrinter (aJSConsolePrinter); // open JavaScript console within the Browser to see this output
-  Message::DefaultMessenger()->Send (TCollection_AsciiString("NbLogicalProcessors: ") + OSD_Parallel::NbLogicalProcessors(), Message_Trace);
+  Message::SendTrace() << "Emscripten SDK " << __EMSCRIPTEN_major__ << "." << __EMSCRIPTEN_minor__ << "." << __EMSCRIPTEN_tiny__;
+#if defined(__LP64__)
+  Message::SendTrace() << "Architecture: WASM 64-bit";
+#else
+  Message::SendTrace() << "Architecture: WASM 32-bit";
+#endif
+  Message::SendTrace() << "NbLogicalProcessors: "
+    << OSD_Parallel::NbLogicalProcessors()
+#ifdef __EMSCRIPTEN_PTHREADS__
+    << " (pthreads ON)"
+#else
+    << " (pthreads OFF)"
+#endif
+  ;
 
   // setup a dummy single-shot main loop callback just to shut up a useless Emscripten error message on calling eglSwapInterval()
   emscripten_set_main_loop (onMainLoop, -1, 0);
index 6be041519d7a73c9f38c4091dda822e1f63ef9c7..ec648a0779ade994e9e29f5795bfa589253d0b82 100644 (file)
@@ -928,6 +928,8 @@ int macrmsg_(const char *,//crout,
 /*  READING OF THE LANGUAGE : */
     /* Parameter adjustments */
   ct -= ct_len;
+  (void )ct; // unused
+
   --xt;
   --it;
   
index a69cb654020c4732dc2d2a472d39bbd85afd0241..aca869e65acfbb2b0fb04ce69b63599afc2a5e15 100644 (file)
@@ -39,7 +39,6 @@ void AppCont_LeastSquare::FixSingleBorderPoint(const AppCont_Function&       the
                                                NCollection_Array1<gp_Pnt>&   theFix)
 {
   Standard_Integer aMaxIter = 15;
-  Standard_Integer j, i2;
   NCollection_Array1<gp_Pnt>   aTabP(1, Max (myNbP, 1)),     aPrevP(1, Max (myNbP, 1));
   NCollection_Array1<gp_Pnt2d> aTabP2d(1,  Max (myNbP2d, 1)), aPrevP2d(1,  Max (myNbP2d, 1));
   Standard_Real aMult = ((theU - theU0) > (theU1 - theU)) ? 1.0: -1.0;
@@ -60,17 +59,18 @@ void AppCont_LeastSquare::FixSingleBorderPoint(const AppCont_Function&       the
     {
       aCurrDist = 0.0;
 
-      i2 = 1;
-      for (j = 1; j <= myNbP; j++)
+      Standard_Integer i2 = 1;
+      for (Standard_Integer j = 1; j <= myNbP; j++)
       {
         aCurrDist += aTabP(j).Distance(aPrevP(j));
         i2 += 3;
       }
-      for (j = 1; j <= myNbP2d; j++)
+      for (Standard_Integer j = 1; j <= myNbP2d; j++)
       {
         aCurrDist += aTabP2d(j).Distance(aPrevP2d(j));
         i2 += 2;
       }
+      (void )i2; // unused but set for debug
 
       // from the third iteration
       if (anIter > 2 && aCurrDist / aPrevDist > 10.0)
index 6880175c84498b6cc096b8d5f833e0230d095f00..0658307d051c85b3ef95428468a4cfbf846e9ea8 100644 (file)
@@ -209,36 +209,38 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch
 
 static Standard_Integer deform(Draw_Interpretor& di,Standard_Integer n,const char** a)
 {
-  if (n <= 1) return 1;
-  
-  Standard_Integer last = n;
-  
+  if (n != 6)
+  {
+    di << "Syntax error: wrong number of arguments";
+    return 1;
+  }
+
   gp_Trsf T;
   gp_GTrsf GT(T);
-  
+
 //  gp_Mat rot(Draw::Atof(a[last-3]),0,0,0,Draw::Atof(a[last-2]),0,0,0,Draw::Atof(a[last-1]));
   gp_Mat rot(Draw::Atof(a[3]),0,0,0,Draw::Atof(a[4]),0,0,0,Draw::Atof(a[5]));
   GT.SetVectorialPart(rot);
-  last -= 3;
   BRepBuilderAPI_GTransform gtrf(GT);
   BRepBuilderAPI_NurbsConvert nbscv;
+  //  Standard_Integer last = n - 3;
   //  for (Standard_Integer i = 1; i < last; i++) {
-  //    TopoDS_Shape S = DBRep::Get(a[i]);
-  TopoDS_Shape S = DBRep::Get(a[2]);    
-  if (S.IsNull()) {
-    //std::cout << a[2] << " is not a valid shape" << std::endl;
-    di << a[2] << " is not a valid shape\n";
+  //    TopoDS_Shape aShape = DBRep::Get(a[i]);
+  TopoDS_Shape aShape = DBRep::Get(a[2]);
+  if (aShape.IsNull())
+  {
+    di << "Syntax error: '" << a[2] << "' is not a valid shape";
+    return 1;
   }
-  else {
-    gtrf.Perform(S);
-    if (gtrf.IsDone()){
-      DBRep::Set(a[1],gtrf.Shape());
-    }
-    else {
-      return 1;
-    }
+
+  gtrf.Perform (aShape);
+  if (!gtrf.IsDone())
+  {
+    di << "Error: transformation failed";
+    return 1;
   }
-  
+
+  DBRep::Set (a[1], gtrf.Shape());
   return 0;
 }
 
index 02dd26a9d4350923060d71ba5f5d90f364ed463d..4d93a4d690ae784387a0602974409767c6b0e537 100644 (file)
@@ -42,14 +42,19 @@ if (EMSCRIPTEN)
   endif()
   #message(STATUS "Tcl version: ${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}.${TCL_RELEASE_SERIAL}")
 
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s MAX_WEBGL_VERSION=2")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --bind")
 
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1")
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s MAX_WEBGL_VERSION=2")
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s MODULARIZE=1")
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXPORT_NAME='createDRAWEXE'")
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['FS']\"")
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
+  #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s TOTAL_MEMORY=512MB")
+  if (EMSCRIPTEN_VERSION VERSION_GREATER_EQUAL "2.0.18")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s \"EXPORTED_RUNTIME_METHODS=['FS']\"")
+  else()
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['FS']\"")
+  endif()
 
   # Embed Draw Harness .tcl scripts at recognizable location.
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --preload-file ${CMAKE_CURRENT_SOURCE_DIR}/../DrawResources@/DrawResources")
index 897e0079571f494031c7518b66f598c911ce8f40..9c2b6c1403d30b22f1cfe9d014b366676ab23ae3 100644 (file)
@@ -453,11 +453,16 @@ static Standard_Integer dversion(Draw_Interpretor& di, Standard_Integer, const c
   di << "Architecture: ARM 32-bit\n";
   #endif
 #elif defined(__EMSCRIPTEN__)
+  di << "Architecture: WASM "
   #if defined(__LP64__)
-  di << "Architecture: WASM 64-bit\n";
+     << "64-bit"
   #else
-  di << "Architecture: WASM 32-bit\n";
+     << "32-bit"
   #endif
+  #if defined(__wasm_simd128__)
+     << " SIMD128"
+  #endif
+     << "\n";
 #else
   di << "Architecture: unrecognized\n";
 #endif
@@ -482,7 +487,13 @@ static Standard_Integer dversion(Draw_Interpretor& di, Standard_Integer, const c
   #include <sys/param.h>
   di << "OS: BSD (BSD = " << BSD << ")\n";
 #elif defined(__EMSCRIPTEN__)
-  di << "OS: WebAssembly (Emscripten SDK " << __EMSCRIPTEN_major__ << "." << __EMSCRIPTEN_minor__ << "." << __EMSCRIPTEN_tiny__ << ")\n";
+  di << "OS: WebAssembly (Emscripten SDK " << __EMSCRIPTEN_major__ << "." << __EMSCRIPTEN_minor__ << "." << __EMSCRIPTEN_tiny__
+  #ifdef __EMSCRIPTEN_PTHREADS__
+     << "; pthreads ON"
+  #else
+     << "; pthreads OFF"
+  #endif
+     << ")\n";
 #else
   di << "OS: unrecognized\n";
 #endif
index c12c696b132cdb6750ee780976e5a82e2a1fdd34..3a2ff0939a5a8a6b1bf882ceeea6d28877fc6598 100644 (file)
@@ -1544,7 +1544,9 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t
        { Standard_Integer NbPoint= (Standard_Integer )( NTPoint*(myLinCont->Value(i)->Length())/LenT);
          if (NbPoint<10)
            NbPoint=10;
-         Npt+=NbPoint;
+
+         (void )Npt; // unused but set for debug
+         Npt += NbPoint;
        }
       // Table containing a cloud of points for calculation of the plane
       Handle(TColgp_HArray1OfPnt) Pts = new TColgp_HArray1OfPnt(1,20*NTLinCont+NTPntCont);
@@ -2418,8 +2420,8 @@ VerifSurface(const Standard_Integer NbBoucle)
 
       EcartContraintesMil (i,tdist,tang,tcourb);
 
-      Standard_Real diffDistMax=0,SdiffDist=0;
-      Standard_Real diffAngMax=0,SdiffAng=0;
+      Standard_Real diffDistMax=0, diffAngMax=0;
+      //Standard_Real SdiffDist=0, SdiffAng=0;
       Standard_Integer NdiffDist=0,NdiffAng=0;
 
    
@@ -2445,7 +2447,7 @@ VerifSurface(const Standard_Integer NbBoucle)
             diffDist = diffDist/LinCont->G0Criterion(U);
            if (diffDist>diffDistMax)
              diffDistMax = diffDist;
-           SdiffDist+=diffDist;
+           //SdiffDist+=diffDist;
            NdiffDist++;
 #ifdef DRAW
            if ((Affich) && (NbBoucle == myNbIter)) {
@@ -2477,7 +2479,7 @@ VerifSurface(const Standard_Integer NbBoucle)
              diffAng=diffAng/myLinCont->Value(i)->G1Criterion(U);
              if (diffAng>diffAngMax)
                diffAngMax = diffAng;
-             SdiffAng+=diffAng;
+             //SdiffAng+=diffAng;
              NdiffAng++;
 #ifdef DRAW
              if ((Affich) && (NbBoucle == myNbIter)) {
index 9e57cb0abd8dfefa0df1939db98b23726072047c..6675efbb858e17a51fd9a80bfda975b7eb0e34a6 100644 (file)
@@ -278,6 +278,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
       else if(Pos2 == IntRes2d_End) PosSegment|=8;
     }
   }
+  (void )PosSegment;
 }
 //======================================================================
 
index 880c532d31c624bdf15bfe177007557ddd9dfc23..320af323b38d0d86bf261205c32d8d78af2fa2b6 100644 (file)
@@ -1975,7 +1975,8 @@ static void ToSmooth( const Handle(IntSurf_LineOn2S)& Line,
 
   Standard_Integer startp = (IsFirst) ? 2 : (Line->NbPoints() - NbTestPnts - 2);
   Standard_Integer ip = 0;
-  Standard_Real Uc = 0., Vc = 0., Un = 0., Vn = 0., DDU = 0., DDV = 0.;
+  Standard_Real Uc = 0., Vc = 0., Un = 0., Vn = 0., DDU = 0.;
+  //Standard_Real DDV = 0.;
 
   for(ip = startp; ip <= NbTestPnts; ip++) {
     if(IsReversed) {
@@ -1987,7 +1988,7 @@ static void ToSmooth( const Handle(IntSurf_LineOn2S)& Line,
       Line->Value(ip+1).ParametersOnS1(Un,Vn);
     }
     DDU += fabs(fabs(Uc)-fabs(Un));
-    DDV += fabs(fabs(Vc)-fabs(Vn));
+    //DDV += fabs(fabs(Vc)-fabs(Vn));
 
     if(ip > startp) {
       Standard_Real DP = Line->Value(ip).Value().Distance(Line->Value(ip-1).Value());
@@ -1996,7 +1997,7 @@ static void ToSmooth( const Handle(IntSurf_LineOn2S)& Line,
   }
 
   DDU /= (Standard_Real) NbTestPnts + 1;
-  DDV /= (Standard_Real) NbTestPnts + 1;
+  //DDV /= (Standard_Real) NbTestPnts + 1;
 
   D3D /= (Standard_Real) NbTestPnts + 1;
 
index 9c706eb3196843ae983cbd89394096558f493b56..328a32d0c7e016358bbf62a022c2371e806e8bfe 100644 (file)
@@ -223,7 +223,7 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
     Standard_Integer aNbFacePrimitives = 0;
     Standard_Integer aNbVolmPrimitives = 0;
     Standard_Integer aNbEdgePrimitives = 0;
-    Standard_Integer aNbLinkPrimitives = 0;
+    //Standard_Integer aNbLinkPrimitives = 0;
 
     for (it.Reset(); it.More(); it.Next())
     {
@@ -247,7 +247,7 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
       }
       else if (aType == MeshVS_ET_Link)
       {
-        aNbLinkPrimitives += aNbNodes - 1; // add link segments
+        //aNbLinkPrimitives += aNbNodes - 1; // add link segments
       }
       else if (aType == MeshVS_ET_Face)
       {
index 919c62655c5f00da2749f566ff37bb9baf99cd93..0d44135cae86a2256bc6d3c0aef79f4c4d7e59f5 100644 (file)
@@ -808,15 +808,12 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform
        return Handle(Geom2d_BSplineCurve)();
       }
       
-
-
-      Standard_Real iinter, ip1inter;
-      Standard_Integer nbK2d, deg;
-      nbK2d = BSC2d->NbKnots(); deg = BSC2d->Degree();
+      Standard_Integer nbK2d = BSC2d->NbKnots();
+      Standard_Integer deg = BSC2d->Degree();
 
       for(i = 2;i <= nbInter;i++) {
-       iinter = Inter.Value(i);
-       ip1inter = Inter.Value(i+1);
+       Standard_Real iinter = Inter.Value(i);
+       Standard_Real ip1inter = Inter.Value(i+1);
        // general case 3d
        GTC->SetTrim(iinter, ip1inter);
        AHC = new GeomAdaptor_Curve(GTC);
@@ -852,6 +849,8 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform
            return Handle(Geom2d_BSplineCurve)();
          }
          LOfBSpline2d.Append(BSC2d);
+
+         (void )nbK2d; // unused but set for debug
          nbK2d += BSC2d->NbKnots() - 1;
          deg = Max(deg, BSC2d->Degree());
        }
index 9ba6935472c1b557cec48e1395a04bb320f0ec06..e28d94ba23fa96d011a6d0573841cad2728d4790 100644 (file)
@@ -538,6 +538,8 @@ Standard_Integer Standard_MMgrOpt::Purge(Standard_Boolean )
       aNextPool = * (Standard_Size **) aNextPool; // get next pool
     }
     const Standard_Integer iLast = iPool - 1;
+
+    (void )nPool; // unused but set for debug
     nPool += iPool;
 
     // scan free blocks, find corresponding pools and increment
@@ -631,6 +633,7 @@ Standard_Integer Standard_MMgrOpt::Purge(Standard_Boolean )
     aPrevPool = (aFreePools[iLastFree] == iLast
                  ? aPrev
                  : aPools[iLast]);
+    (void )nPoolFreed; // unused but set for debug
     nPoolFreed += iLastFree + 1;
   }
 
index 5354c9d579bbff0fea5932c5eda1abba07c92dc3..b4cf1451f263a77868f2c263d612c010ef6e6bdb 100644 (file)
@@ -178,6 +178,8 @@ Standard_Boolean XmlMDF::FromTo (const XmlObjMgt_Element&           theElement,
       // check for error
       if (subcount < 0)
         return Standard_False;
+
+      (void )count; // unused but set for debug
       count += subcount;
     }
     //anElem = (const XmlObjMgt_Element &) anElem.getNextSibling();