From 498ce76bdec726799ce0b7cc197a10ba879a6c72 Mon Sep 17 00:00:00 2001 From: abv Date: Wed, 18 Sep 2013 09:13:31 +0400 Subject: [PATCH] 0024129: Eliminate remaining compiler warnings in MSVC++ 2008 32 bit with warning level 4 List of resolved warnings: c4063: Aspect.cdl; TObj_Application.cxx; PCDM.cdl; OpenGl_Workspace_5.cxx; c4100: XDEDRAW.cxx; ViewerTest_ViewerCommands.cxx; TopOpeBRep_FacesFiller_1.cxx; TopClass_Classifier3d.gxx; TDataStd_ReferenceArray.cxx; QABugs_19.cxx; IntPatch_ImpImpIntersection_5.gxx; HLRTopoBRep_DSFiller.cxx; HLRBRep_Data.lxx; DPrsStd_AISPresentationCommands.cxx; BRepMesh_Delaun.cxx; c4127: BOPTools_AlgoTools2D.cxx; MAT_Mat.gxx; GeomFill_SweepSectionGenerator.cxx; BRepMesh_Delaun.cxx; c4189: IntCurveSurface_Inter.gxx; IGESToBRep_BRepEntity.cxx; BRepMesh_Delaun.cxx; BRepAlgo_Loop.cxx; IntStart_SearchOnBoundaries_1.gxx; c4190: Plugin_Macro.hxx; c4389: Visual3d_View.cxx; TopOpeBRep/TopOpeBRep_vpr.cxx; TDataStd_BooleanArray.cxx; IntPatch_ALine.cxx; c4701: BRepAlgo.cxx; c4702: MNaming_NamingRetrievalDriver_1.cxx; MNaming_NamingRetrievalDriver_2.cxx; BRepClass3d_SolidExplorer.cxx; c4706: TestTopOpe_BOOP.cxx; Additional fixes: - old-style declarations of C functions in IGES and STEP parsers - clean-up of debug code, fixes for building in Debug mode - in BRepFill_TrimShellCorner.cxx, lines 878-9, wrong use of assignment instead of comparison fixed - fix for Plugin_Macro reverted; warning 4190 disabled instead - in IntPatch_ALine.cxx, line 520, wrong comparison of boolean with index fixed - in InterfaceGraphic_Visual3d.hxx, field IsCustomMatrix made boolean - in TopOpeBRepBuild_ShapeSet, obsolete (unused) methods removed --- src/Aspect/Aspect.cdl | 4 +- src/BOPTools/BOPTools_AlgoTools2D.cxx | 20 ++-- src/BRepAlgo/BRepAlgo.cxx | 2 +- src/BRepAlgo/BRepAlgo_Loop.cxx | 12 +- src/BRepCheck/BRepCheck_Wire.cxx | 7 +- src/BRepClass3d/BRepClass3d_SolidExplorer.cxx | 1 - src/BRepFill/BRepFill_TrimShellCorner.cxx | 4 +- src/BRepMesh/BRepMesh_Delaun.cxx | 8 +- src/BRepOffset/BRepOffset_Inter2d.cxx | 4 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 7 +- .../BRepTools_NurbsConvertModification.cxx | 2 - src/BSplSLib/BSplSLib.cxx | 1 - src/BinDrivers/BinDrivers.cxx | 9 +- src/BinLDrivers/BinLDrivers.cxx | 9 +- src/BinTObjDrivers/BinTObjDrivers.cxx | 8 +- src/BinXCAFDrivers/BinXCAFDrivers.cxx | 9 +- .../DPrsStd_AISPresentationCommands.cxx | 2 +- src/Draw/Draw_Window.cxx | 6 +- src/FWOSDriver/FWOSDriver.cxx | 5 +- src/Geom2dAPI/Geom2dAPI_InterCurveCurve.cxx | 6 +- .../GeomFill_SweepSectionGenerator.cxx | 4 +- src/Graphic3d/Graphic3d_MarkerImage.cxx | 4 +- src/HLRBRep/HLRBRep_Data.cxx | 9 +- src/HLRBRep/HLRBRep_Data.lxx | 2 +- src/HLRBRep/HLRBRep_LineTool.lxx | 6 +- src/HLRBRep/HLRBRep_PolyAlgo.cxx | 4 + src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx | 2 +- src/IGESFile/analiges.c | 21 ++-- src/IGESFile/igesread.c | 7 +- src/IGESFile/igesread.h | 2 +- src/IGESFile/structiges.c | 35 ++---- src/IGESToBRep/IGESToBRep_BRepEntity.cxx | 5 - src/Image/Image_AlienPixMap.cxx | 12 +- src/IntCurveSurface/IntCurveSurface_Inter.gxx | 4 +- src/IntPatch/IntPatch_ALine.cxx | 8 +- .../IntPatch_ImpImpIntersection_5.gxx | 12 -- .../IntStart_SearchOnBoundaries_1.gxx | 3 +- .../InterfaceGraphic_Visual3d.hxx | 6 +- src/MAT/MAT_Mat.gxx | 4 +- .../MNaming_NamingRetrievalDriver_1.cxx | 4 +- .../MNaming_NamingRetrievalDriver_2.cxx | 4 +- src/OpenGl/OpenGl_GraphicDriver_3.cxx | 6 +- src/OpenGl/OpenGl_Workspace_5.cxx | 2 +- src/PCDM/PCDM.cdl | 1 + src/QABugs/QABugs_19.cxx | 2 +- .../RWHeaderSection_ReadWriteModule.cxx | 13 +-- src/STEPControl/STEPControl_ActorRead.cxx | 5 +- src/STEPControl/STEPControl_ActorWrite.cxx | 5 +- src/Standard/Standard_MMgrOpt.cxx | 6 +- src/StdDrivers/StdDrivers.cxx | 9 +- src/StdLDrivers/StdLDrivers.cxx | 9 +- src/StepFile/recfile.pc | 44 +++----- src/TDataStd/TDataStd_BooleanArray.cxx | 2 +- src/TDataStd/TDataStd_ReferenceArray.cxx | 2 +- src/TObj/TObj_Application.cxx | 4 +- src/TestTopOpe/TestTopOpe_BOOP.cxx | 29 +++-- src/TestTopOpe/TestTopOpe_BOOPCommands.cxx | 6 +- .../TestTopOpeTools_TraceCommands.cxx | 24 ++-- src/TopClass/TopClass_Classifier3d.gxx | 4 +- src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx | 2 +- src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx | 4 +- src/TopOpeBRep/TopOpeBRep_Point2d.cxx | 6 +- src/TopOpeBRep/TopOpeBRep_ProcessGR.cxx | 6 +- .../TopOpeBRep_ShapeIntersector.cxx | 16 ++- .../TopOpeBRep_ShapeIntersector2d.cxx | 13 ++- src/TopOpeBRep/TopOpeBRep_VPointInter.cxx | 6 +- src/TopOpeBRep/TopOpeBRep_vpr.cxx | 14 +-- .../TopOpeBRepBuild_Area1dBuilder.cxx | 26 +++-- .../TopOpeBRepBuild_FaceBuilder.cxx | 25 ----- .../TopOpeBRepBuild_ShapeSet.cdl | 8 -- .../TopOpeBRepBuild_ShapeSet.cxx | 103 +++--------------- .../TopOpeBRepBuild_ShellFaceSet.cxx | 4 + .../TopOpeBRepBuild_WireEdgeSet.cdl | 2 - .../TopOpeBRepBuild_WireEdgeSet.cxx | 23 ---- src/TopOpeBRepBuild/TopOpeBRepBuild_keep.cxx | 7 +- src/TopOpeBRepDS/TopOpeBRepDS_Curve.cxx | 10 +- .../TopOpeBRepDS_Interference.cxx | 11 +- .../TopOpeBRepDS_SurfaceCurveInterference.cxx | 7 +- .../TopOpeBRepTool_HBoxTool.cxx | 12 +- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 2 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 4 +- src/Visual3d/Visual3d_View.cxx | 2 +- src/XCAFDrivers/XCAFDrivers.cxx | 9 +- src/XDEDRAW/XDEDRAW.cxx | 2 +- src/XmlDrivers/XmlDrivers.cxx | 9 +- src/XmlLDrivers/XmlLDrivers.cxx | 9 +- src/XmlTObjDrivers/XmlTObjDrivers.cxx | 9 +- src/XmlXCAFDrivers/XmlXCAFDrivers.cxx | 8 +- 88 files changed, 349 insertions(+), 467 deletions(-) diff --git a/src/Aspect/Aspect.cdl b/src/Aspect/Aspect.cdl index 17d8f58da6..52566c6fb2 100755 --- a/src/Aspect/Aspect.cdl +++ b/src/Aspect/Aspect.cdl @@ -405,7 +405,8 @@ is IS_HOLLOW, IS_HATCH, IS_SOLID, - IS_HIDDENLINE + IS_HIDDENLINE, + IS_POINT end InteriorStyle; ---Purpose: Definition of interior types for primitive -- faces. @@ -415,6 +416,7 @@ is -- IS_HATCH display hatched with a hatch style. -- IS_SOLID display the interior entirely filled. -- IS_HIDDENLINE display in hidden lines removed. + -- IS_POINT display only vertices. -- ---Category: Enumerations diff --git a/src/BOPTools/BOPTools_AlgoTools2D.cxx b/src/BOPTools/BOPTools_AlgoTools2D.cxx index e8ad3e7a2e..9bfda5dd68 100755 --- a/src/BOPTools/BOPTools_AlgoTools2D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D.cxx @@ -294,22 +294,18 @@ static aUP1=aUPeriod+aDelta; // if (u2 > aUP2) { - for(k=1; 1; ++k) { + k=1; + do { aUx=u2-k*aUPeriod; - if (aUx < aUP1) { - iCnt=k; - break; - } - } + iCnt = k++; + } while (aUx >= aUP1); } else if (u2 < -aUP2) { - for(k=1; 1; ++k) { + k=1; + do { aUx=u2+k*aUPeriod; - if (aUx > -aUP1) { - iCnt=k+1; - break; - } - } + iCnt = (k++) + 1; + } while (aUx <= -aUP1); } du = ( mincond ) ? aUPeriod : -aUPeriod; du=iCnt*du; diff --git a/src/BRepAlgo/BRepAlgo.cxx b/src/BRepAlgo/BRepAlgo.cxx index 51e533b2c9..1884415459 100755 --- a/src/BRepAlgo/BRepAlgo.cxx +++ b/src/BRepAlgo/BRepAlgo.cxx @@ -291,7 +291,7 @@ TopoDS_Edge BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire) FirstVertex = wexp.CurrentVertex(); } else { Standard_Boolean isSameCurve = Standard_False; - Standard_Real NewFpar, NewLpar; + Standard_Real NewFpar = RealFirst(), NewLpar = RealLast(); GeomAdaptor_Curve GAprevcurve(CurveSeq.Last()); if (aCurve == CurveSeq.Last()) { diff --git a/src/BRepAlgo/BRepAlgo_Loop.cxx b/src/BRepAlgo/BRepAlgo_Loop.cxx index c24f6d29fd..5d0088a3aa 100755 --- a/src/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/BRepAlgo/BRepAlgo_Loop.cxx @@ -50,7 +50,7 @@ #ifdef DRAW #include #endif -#ifdef DEB +#ifdef DEBUG_ALGO Standard_Boolean AffichLoop = Standard_False; Standard_Integer NbLoops = 0; Standard_Integer NbWires = 1; @@ -189,7 +189,7 @@ static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E, } if (OnStart && OnEnd) { if (!VB[0].IsSame(VB[1])) { -#ifdef DEB +#ifdef DEBUG_ALGO if (AffichLoop) cout <<"Two different vertices on the closing vertex"< 2) { cout <<"vertex on more than 2 edges in a face."<Allocator() ); NCollection_Map aDelTriangles; @@ -2046,7 +2046,7 @@ void BRepMesh_Delaun::AddVertices( BRepMesh_Array1OfVertexOfDelaun& theVertices //function : UseEdge //purpose : Modify mesh to use the edge. Return True if done //======================================================================= -Standard_Boolean BRepMesh_Delaun::UseEdge( const Standard_Integer theIndex ) +Standard_Boolean BRepMesh_Delaun::UseEdge( const Standard_Integer /*theIndex*/ ) { /* const BRepMesh_PairOfIndex& aPair = myMeshData->ElemConnectedTo( theIndex ); @@ -2459,10 +2459,6 @@ Standard_Real BRepMesh_Delaun::polyArea( const TColStd_SequenceOfInteger& thePol { return aArea; } - - Standard_Integer aEndIndex = (theEndIndex > aPolyLen) ? - aPolyLen : theEndIndex; - Standard_Integer aCurEdgeInfo = thePolygon( theStartIndex ); Standard_Integer aCurEdgeId = Abs( aCurEdgeInfo ); const BRepMesh_Edge* aCurEdge = &GetEdge( aCurEdgeId ); diff --git a/src/BRepOffset/BRepOffset_Inter2d.cxx b/src/BRepOffset/BRepOffset_Inter2d.cxx index 2183a4d1c9..5d5dab4ce0 100755 --- a/src/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/BRepOffset/BRepOffset_Inter2d.cxx @@ -298,7 +298,6 @@ static void EdgeInter(const TopoDS_Face& F, return; Standard_Real f[3],l[3]; - Standard_Real MilTol2 = 1000*Tol*Tol; Standard_Real TolDub = 1.e-7; Standard_Integer i; @@ -401,6 +400,7 @@ static void EdgeInter(const TopoDS_Face& F, cout << "out of limit"< - +//#define DEB_VERB Standard_Boolean AffichInt2d = Standard_False; Standard_Boolean AffichOffC = Standard_False; Standard_Boolean ChronBuild = Standard_False; @@ -3333,9 +3333,8 @@ void BRepOffset_MakeOffset::EncodeRegularity () const TopTools_ListOfShape& LofOF = myAsDes->Ascendant(ROE); if (LofOF.Extent() != 2) { -#ifdef DEB - if ( Standard_False) - cout << " Edge shared by " << LofOF.Extent() << " Faces" << endl; +#ifdef DEB_VERB + cout << " Edge shared by " << LofOF.Extent() << " Faces" << endl; #endif continue; } diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.cxx b/src/BRepTools/BRepTools_NurbsConvertModification.cxx index 086a1be1f7..2074125f46 100755 --- a/src/BRepTools/BRepTools_NurbsConvertModification.cxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.cxx @@ -587,8 +587,6 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d return Standard_True; } } - Curve2d = C2d; - return Standard_True; } //======================================================================= diff --git a/src/BSplSLib/BSplSLib.cxx b/src/BSplSLib/BSplSLib.cxx index 36d0638c3c..13a4afcdde 100755 --- a/src/BSplSLib/BSplSLib.cxx +++ b/src/BSplSLib/BSplSLib.cxx @@ -57,7 +57,6 @@ struct BSplSLib_DataContainer VDegree > BSplCLib::MaxDegree() || BSplCLib::MaxDegree() > 25, "BSplSLib: bspline degree is greater than maximum supported"); } - Standard_Real poles[4*(25+1)*(25+1)]; Standard_Real knots1[2*25]; Standard_Real knots2[2*25]; diff --git a/src/BinDrivers/BinDrivers.cxx b/src/BinDrivers/BinDrivers.cxx index fd6e841692..26fc7ba634 100755 --- a/src/BinDrivers/BinDrivers.cxx +++ b/src/BinDrivers/BinDrivers.cxx @@ -32,11 +32,6 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID BinStorageDriver ("03a56835-8269-11d5-aab2-0050044b1af1"); static Standard_GUID BinRetrievalDriver("03a56836-8269-11d5-aab2-0050044b1af1"); @@ -95,4 +90,8 @@ TCollection_AsciiString BinDrivers::StorageVersion() { return BinLDrivers::StorageVersion(); } + +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif PLUGIN(BinDrivers) diff --git a/src/BinLDrivers/BinLDrivers.cxx b/src/BinLDrivers/BinLDrivers.cxx index 487ccca6dd..5c69617a15 100755 --- a/src/BinLDrivers/BinLDrivers.cxx +++ b/src/BinLDrivers/BinLDrivers.cxx @@ -29,11 +29,6 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID BinLStorageDriver ("13a56835-8269-11d5-aab2-0050044b1af1"); static Standard_GUID BinLRetrievalDriver("13a56836-8269-11d5-aab2-0050044b1af1"); #define CURRENT_DOCUMENT_VERSION 7 @@ -94,4 +89,8 @@ TCollection_AsciiString BinLDrivers::StorageVersion() TCollection_AsciiString aVersionStr (CURRENT_DOCUMENT_VERSION); return aVersionStr; } + +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif PLUGIN(BinLDrivers) diff --git a/src/BinTObjDrivers/BinTObjDrivers.cxx b/src/BinTObjDrivers/BinTObjDrivers.cxx index ec6b3986a7..cffc6a619d 100755 --- a/src/BinTObjDrivers/BinTObjDrivers.cxx +++ b/src/BinTObjDrivers/BinTObjDrivers.cxx @@ -31,11 +31,6 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID BinStorageDriver ("f78ff4a2-a779-11d5-aab4-0050044b1af1"); static Standard_GUID BinRetrievalDriver("f78ff4a3-a779-11d5-aab4-0050044b1af1"); @@ -74,4 +69,7 @@ void BinTObjDrivers::AddDrivers (const Handle(BinMDF_ADriverTable)& aDriverTable aDriverTable -> AddDriver (new BinTObjDrivers_IntSparseArrayDriver (aMsgDrv)); } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif PLUGIN(BinTObjDrivers) diff --git a/src/BinXCAFDrivers/BinXCAFDrivers.cxx b/src/BinXCAFDrivers/BinXCAFDrivers.cxx index ab1903479f..c8edaf23ec 100755 --- a/src/BinXCAFDrivers/BinXCAFDrivers.cxx +++ b/src/BinXCAFDrivers/BinXCAFDrivers.cxx @@ -27,15 +27,9 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID BinXCAFStorageDriver ("a78ff496-a779-11d5-aab4-0050044b1af1"); static Standard_GUID BinXCAFRetrievalDriver("a78ff497-a779-11d5-aab4-0050044b1af1"); - //======================================================================= //function : //purpose : @@ -77,4 +71,7 @@ Handle(BinMDF_ADriverTable) BinXCAFDrivers::AttributeDrivers(const Handle(CDM_Me return aTable; } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif PLUGIN(BinXCAFDrivers) diff --git a/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx b/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx index 3c7e770f2e..8b22de43d3 100755 --- a/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx +++ b/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx @@ -68,7 +68,7 @@ //purpose : DDisplay (DOC,entry, not_update) //======================================================================= -static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor& di, +static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor&, Standard_Integer nb, const char** arg) { diff --git a/src/Draw/Draw_Window.cxx b/src/Draw/Draw_Window.cxx index f6af461905..12d02cdaaa 100755 --- a/src/Draw/Draw_Window.cxx +++ b/src/Draw/Draw_Window.cxx @@ -2042,18 +2042,14 @@ Standard_Boolean Draw_Interprete (const char*); static DWORD WINAPI readStdinThreadFunc(VOID) { if (!Draw_IsConsoleSubsystem) return 1; - for(;;) { while (console_semaphore != WAIT_CONSOLE_COMMAND) Sleep(100); - //if (gets(console_command)) - if (fgets(console_command,COMMAND_SIZE,stdin)) + if (fgets(console_command,COMMAND_SIZE,stdin)) { console_semaphore = HAS_CONSOLE_COMMAND; } - } - return 0; } /*--------------------------------------------------------*\ diff --git a/src/FWOSDriver/FWOSDriver.cxx b/src/FWOSDriver/FWOSDriver.cxx index eecf089c1e..3277f29329 100755 --- a/src/FWOSDriver/FWOSDriver.cxx +++ b/src/FWOSDriver/FWOSDriver.cxx @@ -25,9 +25,8 @@ #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ #endif PLUGIN(FWOSDriver) diff --git a/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.cxx b/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.cxx index 143c0f50e9..558b6178a9 100755 --- a/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.cxx +++ b/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.cxx @@ -221,10 +221,8 @@ void Geom2dAPI_InterCurveCurve::Segment //purpose : //======================================================================= -void Geom2dAPI_InterCurveCurve::Segment - (const Standard_Integer Index, - Handle(Geom2d_Curve)& //Curve1 - ) const +void Geom2dAPI_InterCurveCurve::Segment (const Standard_Integer Index, + Handle(Geom2d_Curve)&) const { Standard_NotImplemented::Raise(" "); diff --git a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx index f4ca11959d..00ab3d70bd 100755 --- a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx +++ b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx @@ -48,7 +48,7 @@ static Standard_Boolean Affich = Standard_False; static Standard_Integer NbSECTIONS = 0; #endif - +//#define GF_DEB //======================================================================= //function : GeomFill_SweepSectionGenerator //purpose : @@ -628,7 +628,7 @@ void GeomFill_SweepSectionGenerator::Section gp_Vec(PPath,P1)); Angle = ElCLib::CircleParameter(Axis,P2); } -#ifdef DEB +#ifdef GF_DEB if (Standard_False) { gp_Vec dummyD1 = myAdpPath->DN(U,1); gp_Vec dummyTg = Axis.Direction(); diff --git a/src/Graphic3d/Graphic3d_MarkerImage.cxx b/src/Graphic3d/Graphic3d_MarkerImage.cxx index 14e853af4c..010726516c 100644 --- a/src/Graphic3d/Graphic3d_MarkerImage.cxx +++ b/src/Graphic3d/Graphic3d_MarkerImage.cxx @@ -181,10 +181,10 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha() myImageAlpha->InitZero (Image_PixMap::ImgGray, myImage->Width(), myImage->Height()); myImageAlpha->SetTopDown (Standard_False); Quantity_Parameter anAlpha; - for (Standard_Integer aRowIter = 0; aRowIter < myImage->Height(); aRowIter++) + for (Standard_Size aRowIter = 0; aRowIter < myImage->Height(); aRowIter++) { Standard_Byte* anImageRow = myImageAlpha->ChangeRow (aRowIter); - for (Standard_Integer aColumnIter = 0; aColumnIter < myImage->Width(); aColumnIter++) + for (Standard_Size aColumnIter = 0; aColumnIter < myImage->Width(); aColumnIter++) { myImage->PixelColor (aColumnIter, aRowIter, anAlpha); anImageRow[aColumnIter] = Standard_Byte (255.0 * anAlpha); diff --git a/src/HLRBRep/HLRBRep_Data.cxx b/src/HLRBRep/HLRBRep_Data.cxx index dc5a02cc9f..4468ca69a2 100755 --- a/src/HLRBRep/HLRBRep_Data.cxx +++ b/src/HLRBRep/HLRBRep_Data.cxx @@ -1625,9 +1625,12 @@ TopAbs_State HLRBRep_Data::Compare (const Standard_Integer E, //purpose : //======================================================================= -Standard_Boolean -HLRBRep_Data::OrientOutLine (const Standard_Integer I, - HLRBRep_FaceData& FD) + +#ifdef DEB +Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_FaceData& FD) +#else +Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer, HLRBRep_FaceData& FD) +#endif { const Handle(HLRAlgo_WiresBlock)& wb = FD.Wires(); Standard_Integer nw = wb->NbWires(); diff --git a/src/HLRBRep/HLRBRep_Data.lxx b/src/HLRBRep/HLRBRep_Data.lxx index 771c191b50..f9fc9aaa40 100755 --- a/src/HLRBRep/HLRBRep_Data.lxx +++ b/src/HLRBRep/HLRBRep_Data.lxx @@ -137,6 +137,6 @@ inline HLRAlgo_Interference & HLRBRep_Data::Interference () //======================================================================= inline Standard_Boolean -HLRBRep_Data::EdgeOfTheHidingFace (const Standard_Integer E, +HLRBRep_Data::EdgeOfTheHidingFace (const Standard_Integer, const HLRBRep_EdgeData& ED) const { return ED.HideCount() == myHideCount-1; } diff --git a/src/HLRBRep/HLRBRep_LineTool.lxx b/src/HLRBRep/HLRBRep_LineTool.lxx index 22122a2267..4c9bbcbe7e 100755 --- a/src/HLRBRep/HLRBRep_LineTool.lxx +++ b/src/HLRBRep/HLRBRep_LineTool.lxx @@ -162,11 +162,11 @@ inline Standard_Integer HLRBRep_LineTool::NbSamples(const gp_Lin&, { return 3; } // modified by NIZHNY-MKK Tue Nov 1 18:49:28 2005 -inline void HLRBRep_LineTool::SamplePars (const gp_Lin& C, +inline void HLRBRep_LineTool::SamplePars (const gp_Lin&, const Standard_Real U0, const Standard_Real U1, - const Standard_Real Defl, - const Standard_Integer NbMin, + const Standard_Real, + const Standard_Integer, Handle(TColStd_HArray1OfReal)& Pars) { Pars = new TColStd_HArray1OfReal(1, 3); diff --git a/src/HLRBRep/HLRBRep_PolyAlgo.cxx b/src/HLRBRep/HLRBRep_PolyAlgo.cxx index f658f22ecd..e1bf45ab03 100755 --- a/src/HLRBRep/HLRBRep_PolyAlgo.cxx +++ b/src/HLRBRep/HLRBRep_PolyAlgo.cxx @@ -3150,7 +3150,11 @@ UpdateAroundNode (const Standard_Integer iNode, //======================================================================= void +#ifdef DEB HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer iTri, +#else +HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer, +#endif const Standard_Address Tri1Indices, const Standard_Address Nod1Indices, const Standard_Address Nod1RValues, diff --git a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx index 27205fba25..c8e744e4d5 100755 --- a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx @@ -68,7 +68,7 @@ static Standard_Boolean IntLineRisesFromRegularity(const TopoDS_Edge& anIntLine, const TopoDS_Edge& anEdge, - const TopoDS_Face& aFace, + const TopoDS_Face&, const TopTools_ListOfShape& aList) { TopoDS_Vertex Ver [2]; diff --git a/src/IGESFile/analiges.c b/src/IGESFile/analiges.c index 53430e194a..b5eaf67efd 100755 --- a/src/IGESFile/analiges.c +++ b/src/IGESFile/analiges.c @@ -23,7 +23,7 @@ void iges_newparam(int typarg,int longval, char *parval); void iges_newpart(int numsec); -void iges_curpart(int numsec,int dnum); +void iges_curpart(int dnum); void iges_addparam(int longval, char* parval); #define ArgVide 0 @@ -55,8 +55,7 @@ static int bases[] = /* Utilitaire decodant un nombre en format fixe dans une ligne Il part de "depuis" inclus (debut ligne = 0) et prend "tant" caracteres Valeur lue en retour de fonction */ -static int IGES_decode(ligne,depuis,tant) -char* ligne; int depuis, tant; +static int IGES_decode (char* ligne, int depuis, int tant) { int val = 0; int i; int depart = depuis+tant-1; @@ -71,8 +70,7 @@ char* ligne; int depuis, tant; } /* Recopie d'une chaine de caracteres de longueur fixe (close par \0) */ -void IGES_copstr(ligne,depuis,tant,dans) -char *ligne; int depuis, tant; char* dans; +void IGES_copstr(char *ligne, int depuis, int tant, char* dans) { int i; for (i = 0; i < tant; i ++) { dans[i] = ligne[depuis+i]; } @@ -80,8 +78,7 @@ char *ligne; int depuis, tant; char* dans; } /* Analyse section D */ -void iges_Dsect (Dstat,numsec,ligne) -int *Dstat,numsec; char* ligne; +void iges_Dsect (int *Dstat, int numsec, char* ligne) { struct dirpart *curp; if (*Dstat == 0) { @@ -125,15 +122,16 @@ int *Dstat,numsec; char* ligne; /* Lecture section P : preanalyse Extraction du numero D et troncature a 64 caracteres */ -void iges_Psect(Pstat,numsec,ligne) -int *Pstat; int numsec; char ligne[80]; +void iges_Psect (int numsec, char ligne[80]) { int dnum; dnum = atoi(&ligne[65]); ligne[64] = '\0'; - iges_curpart(numsec,dnum); + iges_curpart(dnum); #ifdef VERIFPRINT printf("Entite P:%d ->D:%d,soit %s\n",numsec,dnum,ligne); +#else + (void)numsec; // just to avoid warning #endif } @@ -154,8 +152,7 @@ static int typarg; /* + definitions des types de parametres en tete */ -void iges_param(Pstat,ligne,c_separ,c_fin,lonlin) -int *Pstat; char c_separ,c_fin, *ligne; int lonlin; +void iges_param (int *Pstat, char *ligne, char c_separ, char c_fin, int lonlin) { int i,i0,j; char param[80]; char unpar; if (*Pstat == 0) reste = 0; diff --git a/src/IGESFile/igesread.c b/src/IGESFile/igesread.c index 4b00b23e64..0062a2866d 100755 --- a/src/IGESFile/igesread.c +++ b/src/IGESFile/igesread.c @@ -34,7 +34,7 @@ int iges_lire (FILE* lefic, int *numsec, char ligne[100], int modefnes); void iges_newparam(int typarg,int longval, char *parval); void iges_param(int *Pstat,char *ligne,char c_separ,char c_fin,int lonlin); void iges_Dsect (int *Dstat,int numsec,char* ligne); -void iges_Psect(int *Pstat,int numsec,char ligne[80]); +void iges_Psect(int numsec,char ligne[80]); @@ -56,8 +56,7 @@ void iges_Psect(int *Pstat,int numsec,char ligne[80]); static char sects [] = " SGDPT "; -int igesread(nomfic,lesect,modefnes) -char* nomfic; int lesect[6]; int modefnes; +int igesread (char* nomfic, int lesect[6], int modefnes) { /* MGE 16/06/98 */ @@ -113,7 +112,7 @@ char* nomfic; int lesect[6]; int modefnes; } if (i == 3) iges_Dsect(&Dstat,numsec,ligne); /* Directory (Dsect) */ if (i == 4) { /* Parametres (Psect) */ - iges_Psect(&Pstat,numsec,ligne); + iges_Psect(numsec,ligne); for (;;) { iges_param(&Pstat,ligne,c_separ,c_fin,64); if (Pstat != 2) break; diff --git a/src/IGESFile/igesread.h b/src/IGESFile/igesread.h index e49793936c..5f32795561 100755 --- a/src/IGESFile/igesread.h +++ b/src/IGESFile/igesread.h @@ -56,7 +56,7 @@ extern "C" { void iges_newparam(int typarg,int longval, char *parval); void iges_param(int *Pstat,char *ligne,char c_separ,char c_fin,int lonlin); void iges_Dsect (int *Dstat,int numsec,char* ligne); - void iges_Psect(int *Pstat,int numsec,char ligne[80]); + void iges_Psect(int numsec,char ligne[80]); /* MGE 20/07/98 */ void IGESFile_Check2 (int mode,char * code, int num, char * str); diff --git a/src/IGESFile/structiges.c b/src/IGESFile/structiges.c index cabe9392a9..c3d97adba0 100755 --- a/src/IGESFile/structiges.c +++ b/src/IGESFile/structiges.c @@ -92,8 +92,7 @@ static struct dirpage *curpage; /* Utilitaire : Reservation de caracteres Remplace suite de mini-malloc par gestion de page */ -char* iges_newchar(newtext,lentext) -char* newtext; int lentext; +char* iges_newchar (char* newtext, int lentext) { int i, lnt; if ((lnt = onecarpage->used) > Maxcar-lentext-1) { /* allouer nouvelle page */ @@ -143,8 +142,7 @@ void iges_setglobal() /* Definition et Selection d'un nouveau dirpart */ -void iges_newpart(numsec) -int numsec; +void iges_newpart(int numsec) { if (curpage->used >= Maxparts) { struct dirpage* newpage; @@ -163,8 +161,7 @@ int numsec; /* Selection du dirpart dnum, correspond a numsec en Psect */ -void iges_curpart(numsec,dnum) -int numsec,dnum; +void iges_curpart (int dnum) { if (curp == NULL) return; if (dnum == curp->numpart) return; @@ -198,8 +195,7 @@ int numsec,dnum; /* (manque la gestion d'un Hollerith sur plusieurs lignes) */ /* longval : longueur de parval, incluant le zero final */ -void iges_newparam(typarg,longval,parval) -int typarg,longval; char *parval; +void iges_newparam (int typarg, int longval, char *parval) { char *newval; if (curlist == NULL) return; /* non defini : abandon */ @@ -224,8 +220,7 @@ int typarg,longval; char *parval; } /* Complement du parametre courant (cf Hollerith sur +ieurs lignes) */ -void iges_addparam(longval,parval) -int longval; char* parval; +void iges_addparam (int longval, char* parval) { char *newval, *oldval; int i,long0; if (longval <= 0) return; @@ -243,8 +238,7 @@ int longval; char* parval; /* Relecture : Initialiation */ /* entites relues par suite de lirpart + {lirparam} lirparam initiaux : pour relire le demarrage (start section) */ -void iges_stats(nbpart, nbparam) -int* nbpart; int* nbparam; +void iges_stats (int* nbpart, int* nbparam) { curpage = firstpage; curnumpart = 0; curlist = starts; @@ -253,13 +247,10 @@ int* nbpart; int* nbparam; *nbparam = nbparams; } -/* Lecture d'une part : retour = n0 section, 0 si fin */ -int iges_lirpart - (tabval, res1,res2,nom,num, nbparam) - -int* *tabval; /* tableau recepteur des entiers (reserver 17 valeurs) */ -char* *res1; char* *res2; char* *nom; char* *num; /* char : transmis a part */ -int *nbparam; +/* Lecture d'une part : retour = n0 section, 0 si fin */ +/* \par tabval tableau recepteur des entiers (reserver 17 valeurs) */ +/* \par res1 res2 nom num char : transmis a part */ +int iges_lirpart (int* *tabval, char* *res1, char* *res2, char* *nom, char* *num, int *nbparam) { if (curpage == NULL) return 0; curp = &(curpage->parts[curnumpart]); @@ -283,8 +274,7 @@ void iges_nextpart() } /* Lecture parametre + passage au suivant */ -int iges_lirparam(typarg,parval) /* renvoie 0 si fin de liste, 1 sinon */ -int *typarg; char* *parval; +int iges_lirparam (int *typarg, char* *parval) /* renvoie 0 si fin de liste, 1 sinon */ { if (curparam == NULL) return 0; *typarg = curparam->typarg; @@ -295,8 +285,7 @@ int *typarg; char* *parval; /* Fin pour ce fichier : liberer la place */ /* mode = 0 : tout; 1 : parametres; 2 : caracteres */ -void iges_finfile(mode) -int mode; +void iges_finfile (int mode) { struct dirpage* oldpage; if (mode == 0 || mode == 2) { free (starts); free (header); } diff --git a/src/IGESToBRep/IGESToBRep_BRepEntity.cxx b/src/IGESToBRep/IGESToBRep_BRepEntity.cxx index 6899e95cae..ac473f98d5 100755 --- a/src/IGESToBRep/IGESToBRep_BRepEntity.cxx +++ b/src/IGESToBRep/IGESToBRep_BRepEntity.cxx @@ -93,10 +93,6 @@ #include #include -// mjm le 10/10/96 on force la continuity a 0 en attendant de pouvoir -// travailler sur wire en non plus edge. - - //======================================================================= //function : IGESToBRep_BRepEntity //purpose : @@ -466,7 +462,6 @@ TopoDS_Shape IGESToBRep_BRepEntity::TransferFace TopoDS_Face F; Handle(IGESData_IGESEntity) surf = start->Surface(); Standard_Integer nbloops = start->NbLoops(); - Standard_Boolean hasouterloop = start->HasOuterLoop(); IGESToBRep_TopoSurface TS(*this); // surface diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index fd00cfb822..0ff76ba33e 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -143,13 +143,13 @@ bool Image_AlienPixMap::InitWrapper (ImgFormat, // function : InitTrash // purpose : // ======================================================================= +#ifdef HAVE_FREEIMAGE bool Image_AlienPixMap::InitTrash (ImgFormat thePixelFormat, const Standard_Size theSizeX, const Standard_Size theSizeY, - const Standard_Size theSizeRowBytes) + const Standard_Size /*theSizeRowBytes*/) { Clear(); -#ifdef HAVE_FREEIMAGE FREE_IMAGE_TYPE aFormatFI = convertToFreeFormat (thePixelFormat); int aBitsPerPixel = (int )Image_PixMap::SizePixelBytes (thePixelFormat) * 8; if (aFormatFI == FIT_UNKNOWN) @@ -176,10 +176,16 @@ bool Image_AlienPixMap::InitTrash (ImgFormat thePixelFormat, // assign image after wrapper initialization (virtual Clear() called inside) myLibImage = anImage; return true; +} #else +bool Image_AlienPixMap::InitTrash (ImgFormat thePixelFormat, + const Standard_Size theSizeX, + const Standard_Size theSizeY, + const Standard_Size theSizeRowBytes) +{ return Image_PixMap::InitTrash (thePixelFormat, theSizeX, theSizeY, theSizeRowBytes); -#endif } +#endif // ======================================================================= // function : InitCopy diff --git a/src/IntCurveSurface/IntCurveSurface_Inter.gxx b/src/IntCurveSurface/IntCurveSurface_Inter.gxx index 9f729fa665..eae612e697 100755 --- a/src/IntCurveSurface/IntCurveSurface_Inter.gxx +++ b/src/IntCurveSurface/IntCurveSurface_Inter.gxx @@ -78,7 +78,7 @@ #include #include #include - +//#define ICS_DEB static void EstLimForInfExtr(const gp_Lin& Line, const TheSurface& surface, @@ -315,7 +315,9 @@ void IntCurveSurface_Inter::Perform(const TheCurve& curve, done = Standard_True; Standard_Integer NbUOnS = TheSurfaceTool::NbUIntervals(surface,GeomAbs_C2); Standard_Integer NbVOnS = TheSurfaceTool::NbVIntervals(surface,GeomAbs_C2); +#ifdef ICS_DEB Standard_Integer NbOnC = TheCurveTool::NbIntervals(curve,GeomAbs_C2); +#endif Standard_Real U0,U1,V0,V1; if(NbUOnS > 1) { diff --git a/src/IntPatch/IntPatch_ALine.cxx b/src/IntPatch/IntPatch_ALine.cxx index cc0164bbb0..fa3e38c4f4 100755 --- a/src/IntPatch/IntPatch_ALine.cxx +++ b/src/IntPatch/IntPatch_ALine.cxx @@ -518,12 +518,8 @@ void IntPatch_ALine::ComputeVertexParameters(const Standard_Real Tol) { if( (VTX0.IsOnDomS1() == Standard_False) && (VTX0.IsOnDomS2() == Standard_False)) { svtx.Remove(nbvtx); -#ifndef DEB - if((signed)lapt == nbvtx) { -#else - if(lapt == nbvtx) { -#endif - indl--; + if(lapt) { + indl--; } } } diff --git a/src/IntPatch/IntPatch_ImpImpIntersection_5.gxx b/src/IntPatch/IntPatch_ImpImpIntersection_5.gxx index 2320d6cee0..55f582ce94 100755 --- a/src/IntPatch/IntPatch_ImpImpIntersection_5.gxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection_5.gxx @@ -568,13 +568,6 @@ Standard_Boolean IntCoSp(const IntSurf_Quadric& Quad1, { gp_Vec Tgt; gp_Pnt ptref; -#ifndef DEB - Co.Apex(); -#else - gp_Pnt apex(Co.Apex()); - //Standard_Real param; - Standard_Real paramapex = ElCLib::LineParameter(Co.Axis(),apex); -#endif for (i=1; i<=NbSol; i++) { gp_Circ cirsol = inter.Circle(i); @@ -669,11 +662,6 @@ Standard_Boolean IntCoSp(const IntSurf_Quadric& Quad1, gp_Pnt ptvalid, ptf, ptl; gp_Vec tgvalid; -#ifdef DEB - Standard_Real paramapex = -#endif - ElCLib::LineParameter(Co.Axis(), - Co.Apex()); Standard_Real first,last,para; Standard_Boolean tgfound,firstp,lastp,kept; Standard_Integer kount; diff --git a/src/IntStart/IntStart_SearchOnBoundaries_1.gxx b/src/IntStart/IntStart_SearchOnBoundaries_1.gxx index c99c74640b..e7e34ef076 100755 --- a/src/IntStart/IntStart_SearchOnBoundaries_1.gxx +++ b/src/IntStart/IntStart_SearchOnBoundaries_1.gxx @@ -269,7 +269,6 @@ void BoundedArc (const TheArc& A, if (!SolAgain.IsDone()) {Standard_Failure::Raise();} - Standard_Integer Nbp_again = SolAgain.NbPoints(); Standard_Integer Nbi_again = SolAgain.NbIntervals(); if (Nbi_again > 0) @@ -826,7 +825,7 @@ void PointProcess (const gp_Pnt& Pt, //function : IsRegularity //purpose : //======================================================================= -Standard_Boolean IsRegularity(const TheArc& A, +Standard_Boolean IsRegularity(const TheArc&, const Handle(TheTopolTool)& aDomain) { Standard_Address anEAddress=aDomain->Edge(); diff --git a/src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx b/src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx index 1dc74d06be..9eeb99bbfd 100755 --- a/src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx +++ b/src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx @@ -98,9 +98,10 @@ typedef struct { float ViewScaleY; float ViewScaleZ; - int IsCustomMatrix; float ModelViewMatrix[4][4]; + unsigned IsCustomMatrix; + } CALL_DEF_VIEWORIENTATION; @@ -120,9 +121,10 @@ typedef struct { float um, vm, uM, vM; } WindowLimit; - int IsCustomMatrix; float ProjectionMatrix[4][4]; + unsigned IsCustomMatrix; + } CALL_DEF_VIEWMAPPING; /* REPERAGE */ diff --git a/src/MAT/MAT_Mat.gxx b/src/MAT/MAT_Mat.gxx index 28c85495f3..21a2dbea20 100755 --- a/src/MAT/MAT_Mat.gxx +++ b/src/MAT/MAT_Mat.gxx @@ -267,7 +267,7 @@ void MAT_Mat::CreateMat(Tool& atool) //--------------------------------------------------- // boucle 2 Tant qu il y a des bisectrices a effacer. //--------------------------------------------------- - while(Standard_True) { + for(;;) { NbIterBis++; noofbisectorstoremove = 0; @@ -339,7 +339,7 @@ void MAT_Mat::CreateMat(Tool& atool) // BisectorNumber(),0); diff --git a/src/MNaming/MNaming_NamingRetrievalDriver_1.cxx b/src/MNaming/MNaming_NamingRetrievalDriver_1.cxx index d27de9c3fa..1d6e88e582 100755 --- a/src/MNaming/MNaming_NamingRetrievalDriver_1.cxx +++ b/src/MNaming/MNaming_NamingRetrievalDriver_1.cxx @@ -52,10 +52,8 @@ static TopAbs_ShapeEnum IntegerToShapeEnum (const Standard_Integer I) case 5 : return TopAbs_WIRE; case 6 : return TopAbs_EDGE; case 7 : return TopAbs_VERTEX; - default : - return TopAbs_SHAPE; + default : return TopAbs_SHAPE; } - return TopAbs_SHAPE; } //======================================================================= diff --git a/src/MNaming/MNaming_NamingRetrievalDriver_2.cxx b/src/MNaming/MNaming_NamingRetrievalDriver_2.cxx index b3c9e8c4f9..6769df6460 100644 --- a/src/MNaming/MNaming_NamingRetrievalDriver_2.cxx +++ b/src/MNaming/MNaming_NamingRetrievalDriver_2.cxx @@ -51,10 +51,8 @@ static TopAbs_ShapeEnum IntegerToShapeEnum (const Standard_Integer I) case 5 : return TopAbs_WIRE; case 6 : return TopAbs_EDGE; case 7 : return TopAbs_VERTEX; - default : - return TopAbs_SHAPE; + default : return TopAbs_SHAPE; } - return TopAbs_SHAPE; } //======================================================================= diff --git a/src/OpenGl/OpenGl_GraphicDriver_3.cxx b/src/OpenGl/OpenGl_GraphicDriver_3.cxx index 9231bfacfe..50f98fac11 100755 --- a/src/OpenGl/OpenGl_GraphicDriver_3.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver_3.cxx @@ -69,9 +69,9 @@ void OpenGl_GraphicDriver::MarkerContextGroup (const Graphic3d_CGroup& theCGroup void OpenGl_GraphicDriver::MarkerContextGroup (const Graphic3d_CGroup& theCGroup, const Standard_Integer theNoInsert, - const Standard_Integer theMarkWidth, - const Standard_Integer theMarkHeight, - const Handle(TColStd_HArray1OfByte)& theTexture) + const Standard_Integer /*theMarkWidth*/, + const Standard_Integer /*theMarkHeight*/, + const Handle(TColStd_HArray1OfByte)& /*theTexture*/) { if (!theCGroup.ContextMarker.IsDef) { diff --git a/src/OpenGl/OpenGl_Workspace_5.cxx b/src/OpenGl/OpenGl_Workspace_5.cxx index b930da94cd..5f8d740f30 100644 --- a/src/OpenGl/OpenGl_Workspace_5.cxx +++ b/src/OpenGl/OpenGl_Workspace_5.cxx @@ -516,7 +516,7 @@ const OpenGl_AspectFace* OpenGl_Workspace::AspectFace (const Standard_Boolean th glDisable (GL_POLYGON_STIPPLE); break; } - case 5: //szvgl - no corresponding enumeration item Aspect_IS_POINT // = 5 + case Aspect_IS_POINT: //szvgl - no corresponding enumeration item Aspect_IS_POINT // = 5 { glPolygonMode(GL_FRONT_AND_BACK,GL_POINT); break; diff --git a/src/PCDM/PCDM.cdl b/src/PCDM/PCDM.cdl index 3758d6c828..f9b3609e6a 100755 --- a/src/PCDM/PCDM.cdl +++ b/src/PCDM/PCDM.cdl @@ -49,6 +49,7 @@ is RS_AlreadyRetrieved, RS_UnknownDocument, RS_WrongResource, + RS_ReaderException, RS_NoModel end ReaderStatus; diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index cc85faf99e..13f8787b79 100755 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -682,7 +682,7 @@ static Standard_Integer OCC24019 (Draw_Interpretor& di, Standard_Integer argc, c //function : OCC11758 //purpose : //======================================================================= -static Standard_Integer OCC11758 (Draw_Interpretor& di, Standard_Integer n, const char** argv) +static Standard_Integer OCC11758 (Draw_Interpretor& di, Standard_Integer n, const char**) { if (n != 1) return 1; diff --git a/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx b/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx index a702e8a728..a785b7dfee 100755 --- a/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx +++ b/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx @@ -62,20 +62,19 @@ return 0; } // --- External Mapping Case Recognition --- - -Standard_Integer RWHeaderSection_ReadWriteModule::CaseStep - (const TColStd_SequenceOfAsciiString& types) const +#ifdef DEB +Standard_Integer RWHeaderSection_ReadWriteModule::CaseStep (const TColStd_SequenceOfAsciiString& types) const { - Standard_Integer NbComp = types.Length(); -#ifdef DEB if (NbComp < 2) { cout << "Plex Instance illegal " << endl; } -#endif return 0; } - +#else +Standard_Integer RWHeaderSection_ReadWriteModule::CaseStep (const TColStd_SequenceOfAsciiString&) const +{ return 0; } +#endif // --- External Mapping Recognition --- diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 4daff0ecfd..4450ff3892 100755 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -135,6 +135,7 @@ // Purpose: Use it in DEB mode to dump your shapes // ============================================================================ +#ifdef DEB static void DumpWhatIs(const TopoDS_Shape& S) { TopTools_MapOfShape aMapOfShape; @@ -180,7 +181,7 @@ static void DumpWhatIs(const TopoDS_Shape& S) { nbVertexes++; } } - #ifdef DEB + cout << "//What is?// NB COMPOUNDS: " << nbCompounds << endl; cout << "//What is?// NB SOLIDS: " << nbSolids << endl; cout << "//What is?// NB SHELLS: " << nbShells << endl; @@ -190,8 +191,8 @@ static void DumpWhatIs(const TopoDS_Shape& S) { cout << "//What is?// NB WIRES: " << nbWires << endl; cout << "//What is?// NB EDGES: " << nbEdges << endl; cout << "//What is?// NB VERTEXES: " << nbVertexes << endl; - #endif } +#endif namespace { // Set global var to inform outer methods that current representation item is non-manifold. diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index e2c499b2d6..d713de5a07 100755 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -124,6 +124,7 @@ // Purpose: Use it in DEB mode to dump your shapes // ============================================================================ +#ifdef DEB static void DumpWhatIs(const TopoDS_Shape& S) { TopTools_MapOfShape aMapOfShape; @@ -163,7 +164,7 @@ static void DumpWhatIs(const TopoDS_Shape& S) { nbVertexes++; } } - #ifdef DEB + cout << "//What is?// NB SOLIDS: " << nbSolids << endl; cout << "//What is?// NB SHELLS: " << nbShells << endl; cout << "//What is?// OPEN SHELLS: " << nbOpenShells << endl; @@ -172,8 +173,8 @@ static void DumpWhatIs(const TopoDS_Shape& S) { cout << "//What is?// NB WIRES: " << nbWires << endl; cout << "//What is?// NB EDGES: " << nbEdges << endl; cout << "//What is?// NB VERTEXES: " << nbVertexes << endl; - #endif } +#endif //======================================================================= // Function : IsManifoldShape diff --git a/src/Standard/Standard_MMgrOpt.cxx b/src/Standard/Standard_MMgrOpt.cxx index bf34b1fa6a..7f049b67f8 100755 --- a/src/Standard/Standard_MMgrOpt.cxx +++ b/src/Standard/Standard_MMgrOpt.cxx @@ -793,10 +793,10 @@ retry: PAGE_READWRITE, DWORD(AlignedSize / 0x80000000), DWORD(AlignedSize % 0x80000000), NULL); - HANDLE * aMBlock = NULL; + HANDLE * aMBlock = (hMap && GetLastError() != ERROR_ALREADY_EXISTS ? + (HANDLE*)MapViewOfFile(hMap,FILE_MAP_WRITE,0,0,0) : NULL); // check for error and try allocating address space - if ( ! hMap || GetLastError() == ERROR_ALREADY_EXISTS || - ! ((aMBlock = (HANDLE*)MapViewOfFile(hMap,FILE_MAP_WRITE,0,0,0))) ) + if ( ! aMBlock ) { // close handle if allocated if ( hMap ) diff --git a/src/StdDrivers/StdDrivers.cxx b/src/StdDrivers/StdDrivers.cxx index 1a7c155379..c74d9a9581 100755 --- a/src/StdDrivers/StdDrivers.cxx +++ b/src/StdDrivers/StdDrivers.cxx @@ -30,11 +30,6 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID StdStorageDriver ("ad696000-5b34-11d1-b5ba-00a0c9064368"); static Standard_GUID StdRetrievalDriver ("ad696001-5b34-11d1-b5ba-00a0c9064368"); static Standard_GUID StdSchemaID ("ad696002-5b34-11d1-b5ba-00a0c9064368"); @@ -82,5 +77,9 @@ Handle(Standard_Transient) StdDrivers::Factory(const Standard_GUID& aGUID) { return t; } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif + // Declare entry point PLUGINFACTORY PLUGIN(StdDrivers) diff --git a/src/StdLDrivers/StdLDrivers.cxx b/src/StdLDrivers/StdLDrivers.cxx index ec8e4ec6c5..6b975e1d02 100755 --- a/src/StdLDrivers/StdLDrivers.cxx +++ b/src/StdLDrivers/StdLDrivers.cxx @@ -29,11 +29,6 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID StdLStorageDriver ("bd696000-5b34-11d1-b5ba-00a0c9064368"); static Standard_GUID StdLRetrievalDriver ("bd696001-5b34-11d1-b5ba-00a0c9064368"); static Standard_GUID StdLSchemaID ("bd696002-5b34-11d1-b5ba-00a0c9064368"); @@ -73,5 +68,9 @@ Handle(Standard_Transient) StdLDrivers::Factory(const Standard_GUID& aGUID) { return t; } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif + // Declare entry point PLUGINFACTORY PLUGIN(StdLDrivers) diff --git a/src/StepFile/recfile.pc b/src/StepFile/recfile.pc index f4066e4f7a..efd143c087 100755 --- a/src/StepFile/recfile.pc +++ b/src/StepFile/recfile.pc @@ -57,8 +57,7 @@ static char txt_cart_p[] = "CARTESIAN_POINT"; -void rec_restext(newtext,lentext) /* destine a etre appele de l'exterieur */ -char* newtext; int lentext; +void rec_restext(char* newtext, int lentext) /* destine a etre appele de l'exterieur */ { char *res, *text; if(strcmp(newtext,txt_cart_p)==0) { @@ -83,18 +82,16 @@ char* newtext; int lentext; *res = '\0' ; } -void rec_gettext(r) -char* *r ; -{ *r = restext; } +void rec_gettext(char* *r) /* Le resultat retourne (pointeur) est destine a etre inclus dans un struct */ +{ *r = restext; } -void rec_settext(s) -char* s ; /* substituer le texte courant par un autre deja alloue */ +void rec_settext(char* s) +/* substituer le texte courant par un autre deja alloue */ { restext = s ; } -char* rec_newtext(r) +char* rec_newtext(char* r) /* routine utilitaire creant une chaine dynamique a partir d'un char[] */ -char* r ; { char* savrestext; char* s0; savrestext = restext; @@ -173,8 +170,7 @@ static char idzero[] = "#0"; /* Trace pour controle */ -void recfile_modeprint(mode) -int mode ; +void recfile_modeprint(int mode) { modeprint = mode; } static int lastno; @@ -221,8 +217,8 @@ void rec_finfile() { } /* GESTION DES RECORDS */ /* ENREGISTRER UN RECORD (deja pret) */ -void static rec_new(newrec) -struct rec* newrec ; /* nouveau record a enregistrer */ +void static rec_new(struct rec* newrec) +/* nouveau record a enregistrer */ { nbrec ++ ; if ( firstrec == NULL ) firstrec = newrec ; @@ -231,8 +227,7 @@ struct rec* newrec ; /* nouveau record a enregistrer */ } /* type du dernier argument lu */ -void rec_typarg(argtype) -int argtype ; +void rec_typarg(int argtype) { typarg = argtype; } /* ENREGISTRER UNE ENTITE (record courant) */ @@ -392,8 +387,7 @@ void rec_deblist() /* Affichage du contenu d'un record */ -void rec_print(unrec) -struct rec* unrec ; +void rec_print(struct rec* unrec) { int numa = 0; int numl = 0; int argl = 0; if (unrec == NULL) { printf ("Non defini\n") ; return; } @@ -490,8 +484,7 @@ void scope_fin() La liberation de la memoire est faite par lir_file_fin, en une fois */ -void lir_file_nbr(nbh,nbr,nbp) -int* nbh; int* nbr; int* nbp; +void lir_file_nbr(int* nbh, int* nbr, int* nbp) /* initialise le traitement et retourne la taille du directory et du header */ { currec = firstrec ; @@ -499,8 +492,7 @@ int* nbh; int* nbr; int* nbp; *nbh = nbhead; *nbr = nbrec; *nbp = nbpar; } -void lir_file_fin(mode) -int mode; +void lir_file_fin(int mode) /* fin du traitement : regroupe les liberations de memoire en une phase */ /* mode = 1 : rec+arg. 2 : carpage; 3 : 1+2 */ { @@ -538,10 +530,9 @@ int mode; } } -int lir_file_rec(ident,type,nbarg) +int lir_file_rec(char* *ident, char* *type, int *nbarg) /* retourne les parametres du record courant retour de fonction ; 1 si ok, 0 si liste epuisee */ -char* *ident ; char* *type ; int *nbarg ; { if (currec == NULL) return (0) ; /* rec_check(2) ; */ @@ -560,8 +551,7 @@ void lir_file_finrec() /* rec_check(2) ; */ } -int lir_file_arg(type,val) -int* type ; char* *val ; +int lir_file_arg(int* type, char* *val) /* lit l'argument courant (au debut le 1er), fait le menage, prepare suivant retourne 1 si ok, 0 si c'est fini attention, suppose que nbarg > 0 ... (bref, pas de protection) */ @@ -579,8 +569,8 @@ int* type ; char* *val ; /* Affiche ce qui ne va pas, mais aussi accede a tout : ainsi, les adresses verolees aparaissent au grand jour du dbx */ -void rec_check(mode) -int mode ; /* =1 pas de controle nbrec (en cours d'enregistrement) */ +void rec_check(int mode) +/* mode=1 pas de controle nbrec (en cours d'enregistrement) */ { struct rec* lerec ; struct unarg* larg ; int nr,na ; lerec = firstrec ; diff --git a/src/TDataStd/TDataStd_BooleanArray.cxx b/src/TDataStd/TDataStd_BooleanArray.cxx index 895355a723..dfb970f671 100755 --- a/src/TDataStd/TDataStd_BooleanArray.cxx +++ b/src/TDataStd/TDataStd_BooleanArray.cxx @@ -117,7 +117,7 @@ void TDataStd_BooleanArray::SetValue (const Standard_Integer index, Standard_Integer degree = index - (byte_index << 3) - myLower; Standard_Integer byte_value = DegreeOf2(degree); - if (value == ((myValues->Value(byte_index) & byte_value) > 0)) + if ((value != 0) == ((myValues->Value(byte_index) & byte_value) > 0)) return; Backup(); diff --git a/src/TDataStd/TDataStd_ReferenceArray.cxx b/src/TDataStd/TDataStd_ReferenceArray.cxx index 4b6e2eff07..88ab765106 100755 --- a/src/TDataStd/TDataStd_ReferenceArray.cxx +++ b/src/TDataStd/TDataStd_ReferenceArray.cxx @@ -144,7 +144,7 @@ const Handle(TDataStd_HLabelArray1)& TDataStd_ReferenceArray::InternalArray () c //purpose : //======================================================================= void TDataStd_ReferenceArray::SetInternalArray (const Handle(TDataStd_HLabelArray1)& values, - const Standard_Boolean isCheckItem) + const Standard_Boolean) { // myArray = values; Standard_Integer aLower = values->Lower(); diff --git a/src/TObj/TObj_Application.cxx b/src/TObj/TObj_Application.cxx index 6e70fc0ea5..4c1fdbfdc6 100755 --- a/src/TObj/TObj_Application.cxx +++ b/src/TObj/TObj_Application.cxx @@ -138,7 +138,7 @@ Standard_Boolean TObj_Application::LoadDocument myIsError = Standard_False; TCollection_ExtendedString aPath ((const Standard_CString)theSourceFile); - PCDM_ReaderStatus aStatus = (PCDM_ReaderStatus) -1; + PCDM_ReaderStatus aStatus = PCDM_RS_ReaderException; { try { @@ -202,7 +202,7 @@ Standard_Boolean TObj_Application::LoadDocument case PCDM_RS_DriverFailure: ErrorMessage (Message_Msg("TObj_Appl_RDriverFailure") << aPath); break; - case -1: + case PCDM_RS_ReaderException: ErrorMessage (Message_Msg("TObj_Appl_RException") << aPath); break; default: diff --git a/src/TestTopOpe/TestTopOpe_BOOP.cxx b/src/TestTopOpe/TestTopOpe_BOOP.cxx index 935699eefb..aefe5b7db8 100755 --- a/src/TestTopOpe/TestTopOpe_BOOP.cxx +++ b/src/TestTopOpe/TestTopOpe_BOOP.cxx @@ -63,13 +63,25 @@ extern void PrintKRO_PREPA(); Standard_Integer TestTopOpe_BOOP::Prepare(const char* ns1,const char* ns2) { - Standard_Integer err = 0; - if ((err = LoadShapes(ns1,ns2))) return err; // 0 - if ((err = LoadnewDS())) return err; // 100 - if ((err = DSF_Insert())) return err; // 100<,<200 - if ((err = LoadnewHB())) return err; // 200 - if ((err = Builder_Perform())) return err; // 200<,<300 - return 0; + Standard_Integer anErrorCode = 0; + anErrorCode = LoadShapes(ns1,ns2); // mylastPREP is 0 + if (anErrorCode) + return anErrorCode; + + anErrorCode = LoadnewDS(); // mylastPREP is 100 + if (anErrorCode) + return anErrorCode; + + anErrorCode = DSF_Insert(); // mylastPREP is (100,200) + if (anErrorCode) + return anErrorCode; + + anErrorCode = LoadnewHB(); // mylastPREP is 200 + if (anErrorCode) + return anErrorCode; + + anErrorCode = Builder_Perform(); // mylastPREP is (200,300) + return anErrorCode; } Standard_Integer TestTopOpe_BOOP::LoadShapes(const char* ns1, const char* ns2) @@ -95,7 +107,6 @@ Standard_Integer TestTopOpe_BOOP::LoadnewDS() Standard_Integer TestTopOpe_BOOP::DSF_Insert() { -// Standard_Integer err = 0; TopOpeBRep_DSFiller DSF; DSF_Insert(DSF); mylastPREP = 190; @@ -104,7 +115,6 @@ Standard_Integer TestTopOpe_BOOP::DSF_Insert() Standard_Integer TestTopOpe_BOOP::LoadnewHB() { -// Standard_Integer err = 0; TopOpeBRepTool_GeomTool GT; Standard_Boolean c2d = myVarsTopo.GetC2D(); GT.Define(myVarsTopo.GetOCT(),Standard_True,c2d, c2d); @@ -118,7 +128,6 @@ Standard_Integer TestTopOpe_BOOP::LoadnewHB() Standard_Integer TestTopOpe_BOOP::Builder_Perform() { -// Standard_Integer err = 0; myHB->Perform(myHDS,myS1,myS2); #ifdef DEB if ( TopOpeBRepTool_GettraceKRO() ) PrintKRO_PREPA(); diff --git a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx index 3106068036..5e2d1245a7 100755 --- a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx @@ -322,18 +322,20 @@ Standard_Integer TOPOC(Draw_Interpretor& interpretor,Standard_Integer na,const c } // TOPO // ---------------------------------------------------------------------- +#ifdef DEB Standard_Integer BOOPCHK(Draw_Interpretor& ,Standard_Integer na,const char** a) { if (!strcmp(a[0],"tchk")) { -#ifdef DEB // Standard_IMPORT extern Standard_Integer TopOpeBRepTool_BOOOPE_CHECK_DEB; Standard_IMPORT Standard_Integer TopOpeBRepTool_BOOOPE_CHECK_DEB; if ( na >= 2 ) TopOpeBRepTool_BOOOPE_CHECK_DEB = (Draw::Atoi(a[1])) ? 1 : 0; -#endif return 0; } return 0; } +#else +Standard_Integer BOOPCHK(Draw_Interpretor& ,Standard_Integer,const char**) {return 0;} +#endif // ---------------------------------------------------- Standard_Integer TOPOSETCOMMANDS(TestTopOpe_BOOP& PT,Standard_Integer na,const char** a, Draw_Interpretor& di) diff --git a/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx b/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx index 5be2c38d46..580db06b38 100755 --- a/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx +++ b/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx @@ -203,12 +203,11 @@ static Standard_Integer InitTraceTopOpeKernel (TestTopOpeTools_Trace& T) return 0; } #endif - +#ifdef DEB //---------------------------------------------------------------------------- Standard_Integer InitContextTopOpeKernel (TestTopOpeTools_Trace& T) //---------------------------------------------------------------------------- { -#ifdef DEB if (T.Add("nosew",(tf_value)TopOpeBRepTool_SetcontextNOSEW)) return 1; if (T.Add("nopnc",(tf_value)TopOpeBRepDS_SetcontextNOPNC)) return 1; if (T.Add("nosg",(tf_value)TopOpeBRepBuild_SetcontextNOSG)) return 1; @@ -238,9 +237,12 @@ Standard_Integer InitContextTopOpeKernel (TestTopOpeTools_Trace& T) if (T.Add("nopfi",(tf_value)TopOpeBRepDS_SetcontextNOPFI)) return 1; if (T.Add("mktonreg",(tf_value)TopOpeBRepDS_SetcontextMKTONREG)) return 1; if (T.Add("nogap",(tf_value)TopOpeBRepDS_SetcontextNOGAP)) return 1; -#endif + return 0; } +#else +Standard_Integer InitContextTopOpeKernel (TestTopOpeTools_Trace&) { return 0;} +#endif Standard_EXPORT Standard_Integer TestTopOpeTools_SetFlags (TestTopOpeTools_Trace& theFlags, Standard_Integer mute, Standard_Integer n , const char** a) @@ -282,7 +284,12 @@ Standard_EXPORT Standard_Integer TestTopOpeTools_SetFlags // a1 = flag (for example tbs) = value, if omitted flag becomes True //========================================================================= -Standard_Integer TestTopOpeTools_SetTrace(Draw_Interpretor&, Standard_Integer n , const char** a) + +#ifdef DEB +Standard_Integer TestTopOpeTools_SetTrace(Draw_Interpretor&, Standard_Integer n ,const char** a) +#else +Standard_Integer TestTopOpeTools_SetTrace(Draw_Interpretor&, Standard_Integer,const char**) +#endif { Standard_Integer ok = Standard_True; #ifdef DEB @@ -297,16 +304,19 @@ Standard_Integer TestTopOpeTools_SetTrace(Draw_Interpretor&, Standard_Integer n // a1 = flag (for example tbs) = value, if omitted flag becomes True //========================================================================= -Standard_Integer TestTopOpeTools_SetContext(Draw_Interpretor&, Standard_Integer n , const char** a) +#ifdef DEB +Standard_Integer TestTopOpeTools_SetContext(Draw_Interpretor&, Standard_Integer n ,const char** a) { Standard_Integer ok = Standard_True; -#ifdef DEB InitContextTopOpeKernel(theContext); Standard_Integer mute = 0; if (!strcasecmp(a[0],"ctxmute")) mute = 1; ok = TestTopOpeTools_SetFlags(theContext,mute,n,a); -#endif return ok; } +#else +Standard_Integer TestTopOpeTools_SetContext(Draw_Interpretor&, Standard_Integer,const char**) +{ return Standard_True;} +#endif Standard_Integer dstrace(Draw_Interpretor& di, Standard_Integer n , const char** a) { const char ** pa = NULL; TCollection_AsciiString a1; diff --git a/src/TopClass/TopClass_Classifier3d.gxx b/src/TopClass/TopClass_Classifier3d.gxx index 7717f67354..e487d82c42 100755 --- a/src/TopClass/TopClass_Classifier3d.gxx +++ b/src/TopClass/TopClass_Classifier3d.gxx @@ -28,7 +28,7 @@ TopClass_Classifier3d::TopClass_Classifier3d() : isSet(Standard_False) //====================================================================== void TopClass_Classifier3d::Reset(const gp_Lin& L, - const Standard_Real Param, + const Standard_Real, const Standard_Real Tol) { myLin = L; myParam = RealLast(); @@ -41,7 +41,7 @@ void TopClass_Classifier3d::Reset(const gp_Lin& L, #include void TopClass_Classifier3d::Compare(const TopoDS_Face& Face, - const TopAbs_Orientation Orientation) { + const TopAbs_Orientation) { if(!isSet) { cout<<" Call to TopClass_Classifier3d::Compare without a Reset ! "; return; diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx index 6560566470..8ccb11cea9 100755 --- a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx @@ -489,10 +489,10 @@ void TopOpeBRep_EdgesFiller::RecomputeInterferences(const TopoDS_Edge& E,TopOpeB Handle(TopOpeBRepDS_Interference)& iloi = loi.First(); TopOpeBRepDS_Transition& TU = iloi->ChangeTransition(); Standard_Integer ifb = TU.IndexBefore(); - Standard_Integer ifa = TU.IndexAfter(); const TopoDS_Face& fb = TopoDS::Face(myPDS->Shape(ifb)); #ifdef DEB + Standard_Integer ifa = TU.IndexAfter(); if (ifb != ifa) {cout<<"TopOpeBRep_EdgesFiller : ifb != ifa on E"<Dump();cout<Dump(); cout< -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID XSStorageDriver ("ed8793f8-3142-11d4-b9b5-0060b0ee281b"); static Standard_GUID XSRetrievalDriver("ed8793f9-3142-11d4-b9b5-0060b0ee281b"); static Standard_GUID XCAFSchemaID ("ed8793fa-3142-11d4-b9b5-0060b0ee281b"); @@ -82,4 +77,8 @@ Handle(Standard_Transient) XCAFDrivers::Factory(const Standard_GUID& aGUID) { return StdDrivers::Factory (aGUID); } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif + PLUGIN(XCAFDrivers) diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index 7e59d3e90a..9aaf00a3c3 100755 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -1015,7 +1015,7 @@ static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di, //function : testDoc //purpose : Method to test destruction of document //======================================================================= -static Standard_Integer testDoc (Draw_Interpretor& di, +static Standard_Integer testDoc (Draw_Interpretor&, Standard_Integer argc, const char ** argv) { diff --git a/src/XmlDrivers/XmlDrivers.cxx b/src/XmlDrivers/XmlDrivers.cxx index 7b95ab1c2b..680628f0eb 100755 --- a/src/XmlDrivers/XmlDrivers.cxx +++ b/src/XmlDrivers/XmlDrivers.cxx @@ -38,11 +38,6 @@ #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID XmlStorageDriver ("03a56820-8269-11d5-aab2-0050044b1af1"); static Standard_GUID XmlRetrievalDriver("03a56822-8269-11d5-aab2-0050044b1af1"); @@ -93,5 +88,9 @@ Handle(XmlMDF_ADriverTable) XmlDrivers::AttributeDrivers return aTable; } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif + // Declare entry point PLUGINFACTORY PLUGIN(XmlDrivers) diff --git a/src/XmlLDrivers/XmlLDrivers.cxx b/src/XmlLDrivers/XmlLDrivers.cxx index ebf2113025..4a0d3a1899 100755 --- a/src/XmlLDrivers/XmlLDrivers.cxx +++ b/src/XmlLDrivers/XmlLDrivers.cxx @@ -33,11 +33,6 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID XmlLStorageDriver ("13a56820-8269-11d5-aab2-0050044b1af1"); static Standard_GUID XmlLRetrievalDriver("13a56822-8269-11d5-aab2-0050044b1af1"); #define CURRENT_DOCUMENT_VERSION 7 @@ -119,5 +114,9 @@ TCollection_AsciiString XmlLDrivers::StorageVersion() return aVersionStr; } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif + // Declare entry point PLUGINFACTORY PLUGIN(XmlLDrivers) diff --git a/src/XmlTObjDrivers/XmlTObjDrivers.cxx b/src/XmlTObjDrivers/XmlTObjDrivers.cxx index 81f47505f4..92f0074325 100755 --- a/src/XmlTObjDrivers/XmlTObjDrivers.cxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers.cxx @@ -32,11 +32,6 @@ #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID XmlStorageDriver ("f78ff4a0-a779-11d5-aab4-0050044b1af1"); static Standard_GUID XmlRetrievalDriver("f78ff4a1-a779-11d5-aab4-0050044b1af1"); @@ -76,4 +71,8 @@ void XmlTObjDrivers::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable aDriverTable -> AddDriver (new XmlTObjDrivers_IntSparseArrayDriver(anMsgDrv)); } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif + PLUGIN(XmlTObjDrivers) diff --git a/src/XmlXCAFDrivers/XmlXCAFDrivers.cxx b/src/XmlXCAFDrivers/XmlXCAFDrivers.cxx index 99b78c3c67..404da9c5b7 100755 --- a/src/XmlXCAFDrivers/XmlXCAFDrivers.cxx +++ b/src/XmlXCAFDrivers/XmlXCAFDrivers.cxx @@ -27,11 +27,6 @@ #include #include -// avoid warnings on 'extern "C"' functions returning C++ classes -#ifdef WNT -#pragma warning(4:4190) -#endif - static Standard_GUID XSStorageDriver ("f78ff496-a779-11d5-aab4-0050044b1af1"); static Standard_GUID XSRetrievalDriver("f78ff497-a779-11d5-aab4-0050044b1af1"); @@ -56,4 +51,7 @@ Handle(Standard_Transient) XmlXCAFDrivers::Factory(const Standard_GUID& aGUID) return XmlDrivers::Factory (aGUID); } +#ifdef _MSC_VER +#pragma warning(disable:4190) /* disable warning on C++ type returned by C function; should be OK for C++ usage */ +#endif PLUGIN(XmlXCAFDrivers) -- 2.20.1