[SCM] OCE packaging branch, upstream, updated. OCE-0.6.0-230-g17bea23

tpaviot tpaviot at gmail.com
Fri Feb 24 18:50:45 UTC 2012


The following commit has been merged in the upstream branch:
commit 6cc0cf7af904265fd881a3004349502659cd2897
Author: tpaviot <tpaviot at gmail.com>
Date:   Fri Jan 13 06:08:52 2012 +0100

    [cppcheck-error-fix][uninitialized-variable]
    
    [BinMDF/BinMDF_TagSourceDriver.cxx:39]: (error) Uninitialized variable: aValue
    [BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx:67]: (error) Uninitialized variable: aKey
    [BinMDataStd/BinMDataStd_IntegerDriver.cxx:42]: (error) Uninitialized variable: aValue
    [BinMDataStd/BinMDataStd_RealDriver.cxx:42]: (error) Uninitialized variable: aValue
    [BinMDataXtd/BinMDataXtd_GeometryDriver.cxx:42]: (error) Uninitialized variable: aType
    [BinMFunction/BinMFunction_FunctionDriver.cxx:53]: (error) Uninitialized variable: aValue
    [BinMNaming/BinMNaming_NamedShapeDriver.cxx:108]: (error) Uninitialized variable: aShapeID
    [BinMNaming/BinMNaming_NamedShapeDriver.cxx:163]: (error) Uninitialized variable: aVer
    [BinMNaming/BinMNaming_NamedShapeDriver.cxx:167]: (error) Uninitialized variable: aCharEvol
    [BinMNaming/BinMNaming_NamingDriver.cxx:143]: (error) Uninitialized variable: aValue
    [BinMNaming/BinMNaming_NamingDriver.cxx:190]: (error) Uninitialized variable: anIndx
    [BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx:46]: (error) Uninitialized variable: aValue
    [BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx:70]: (error) Uninitialized variable: aRValue
    [BinMPrsStd/BinMPrsStd_PositionDriver.cxx:45]: (error) Uninitialized variable: aValue
    [BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx:36]: (error) Uninitialized variable: aValue
    [BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.cxx:36]: (error) Uninitialized variable: x
    [BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.cxx:36]: (error) Uninitialized variable: y
    [BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.cxx:36]: (error) Uninitialized variable: z
    [BinMXCAFDoc/BinMXCAFDoc_ColorDriver.cxx:35]: (error) Uninitialized variable: R
    [BinMXCAFDoc/BinMXCAFDoc_ColorDriver.cxx:35]: (error) Uninitialized variable: G
    [BinMXCAFDoc/BinMXCAFDoc_ColorDriver.cxx:35]: (error) Uninitialized variable: B
    [BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx:35]: (error) Uninitialized variable: aVol

diff --git a/src/BinMDF/BinMDF_TagSourceDriver.cxx b/src/BinMDF/BinMDF_TagSourceDriver.cxx
index 0b26e8e..9553ac0 100644
--- a/src/BinMDF/BinMDF_TagSourceDriver.cxx
+++ b/src/BinMDF/BinMDF_TagSourceDriver.cxx
@@ -35,7 +35,7 @@ Standard_Boolean BinMDF_TagSourceDriver::Paste
                                  BinObjMgt_RRelocationTable&  ) const
 {
   Handle(TDF_TagSource) aTag = Handle(TDF_TagSource)::DownCast(theTarget);
-  Standard_Integer aValue;
+  Standard_Integer aValue=0;
   Standard_Boolean ok = theSource >> aValue;
   if (ok)
     aTag->Set(aValue);
diff --git a/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx b/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx
index f3e85fd..ba81f3a 100644
--- a/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx
+++ b/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx
@@ -62,7 +62,7 @@ Standard_Boolean BinMDataStd_IntPackedMapDriver::Paste
   }
   if(aSize) {
     Handle(TColStd_HPackedMapOfInteger) aHMap = new TColStd_HPackedMapOfInteger ();
-    Standard_Integer aKey;
+    Standard_Integer aKey=0;
     for(Standard_Integer i = 0; i< aSize; i++) {
       Standard_Boolean ok = Source >> aKey;
       if (!ok) {
diff --git a/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx b/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx
index e0ff6c1..b5976a6 100644
--- a/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx
+++ b/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx
@@ -38,7 +38,7 @@ Standard_Boolean BinMDataStd_IntegerDriver::Paste
                                  BinObjMgt_RRelocationTable&  ) const
 {
   Handle(TDataStd_Integer) anAtt = Handle(TDataStd_Integer)::DownCast(theTarget);
-  Standard_Integer aValue;
+  Standard_Integer aValue=0;
   Standard_Boolean ok = theSource >> aValue;
   if (ok)
     anAtt->Set(aValue);
diff --git a/src/BinMDataStd/BinMDataStd_RealDriver.cxx b/src/BinMDataStd/BinMDataStd_RealDriver.cxx
index 5cd3655..deee48d 100644
--- a/src/BinMDataStd/BinMDataStd_RealDriver.cxx
+++ b/src/BinMDataStd/BinMDataStd_RealDriver.cxx
@@ -38,7 +38,7 @@ Standard_Boolean BinMDataStd_RealDriver::Paste
                                  BinObjMgt_RRelocationTable&  ) const
 {
   Handle(TDataStd_Real) anAtt= Handle(TDataStd_Real)::DownCast(theTarget);
-  Standard_Real aValue;
+  Standard_Real aValue=0.0;
   Standard_Boolean ok = theSource >> aValue;
   if (ok)
     anAtt->Set(aValue);
diff --git a/src/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx b/src/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx
index 47ef021..bd08b8c 100644
--- a/src/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx
+++ b/src/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx
@@ -38,7 +38,7 @@ Standard_Boolean BinMDataXtd_GeometryDriver::Paste
   Handle(TDataXtd_Geometry) aT = 
     Handle(TDataXtd_Geometry)::DownCast (theTarget);
 
-  Standard_Integer aType;
+  Standard_Integer aType=0;
   Standard_Boolean ok = theSource >> aType;
   if (ok)
     aT->SetType ((TDataXtd_GeometryEnum) aType);
diff --git a/src/BinMFunction/BinMFunction_FunctionDriver.cxx b/src/BinMFunction/BinMFunction_FunctionDriver.cxx
index 4e87b79..f3e8a9d 100644
--- a/src/BinMFunction/BinMFunction_FunctionDriver.cxx
+++ b/src/BinMFunction/BinMFunction_FunctionDriver.cxx
@@ -49,7 +49,7 @@ Standard_Boolean BinMFunction_FunctionDriver::Paste
   Standard_Boolean ok = theSource >> aGUID;
   if (ok) {
     anAtt->SetDriverGUID(aGUID);  
-    Standard_Integer aValue;
+    Standard_Integer aValue=0;
     ok = theSource >> aValue;
     if(ok)
       anAtt->SetFailure(aValue); 
diff --git a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
index fefb268..1f23f8e 100644
--- a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
+++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
@@ -103,7 +103,7 @@ static int TranslateFrom  (const BinObjMgt_Persistent&  theSource,
                          TopoDS_Shape&                  theResult,
                          BinTools_ShapeSet&            theShapeSet)
 {
-  Standard_Integer aShapeID, aLocID;
+  Standard_Integer aShapeID=0, aLocID=0;
   Standard_Character aCharOrient;
   Standard_Boolean Ok = theSource >> aShapeID; //TShapeID;
   if(!Ok) return 1;
@@ -159,11 +159,11 @@ Standard_Boolean BinMNaming_NamedShapeDriver::Paste
   TDF_Label aLabel = theTarget->Label ();
   TNaming_Builder   aBuilder   (aLabel);
   if (aNbShapes == 0) return Standard_False;
-  Standard_Integer aVer;
+  Standard_Integer aVer=0;
   Standard_Boolean ok = theSource >> aVer;
   if(!ok) return Standard_False;
   aTAtt->SetVersion(aVer); //Version
-  Standard_Character aCharEvol;
+  Standard_Character aCharEvol='\0';
   ok = theSource >> aCharEvol;
   if(!ok) return Standard_False;
   TNaming_Evolution anEvol  = EvolutionToEnum(aCharEvol); //Evolution
diff --git a/src/BinMNaming/BinMNaming_NamingDriver.cxx b/src/BinMNaming/BinMNaming_NamingDriver.cxx
index b373628..4f1b649 100644
--- a/src/BinMNaming/BinMNaming_NamingDriver.cxx
+++ b/src/BinMNaming/BinMNaming_NamingDriver.cxx
@@ -139,7 +139,7 @@ Standard_Boolean BinMNaming_NamingDriver::Paste
   TNaming_Name& aName = anAtt->ChangeName();
   TCollection_ExtendedString aMsg;
 //1. NameType
-  Standard_Character aValue;
+  Standard_Character aValue='\0';
   Standard_Boolean ok = theSource >> aValue;
   Standard_Boolean aNewF = Standard_False;
   if (ok) {
@@ -158,7 +158,7 @@ Standard_Boolean BinMNaming_NamingDriver::Paste
       
 //3. Args
       Standard_Integer aNbArgs=0;
-      Standard_Integer anIndx;
+      Standard_Integer anIndx=0;
       Handle(TNaming_NamedShape) aNS;
       ok = theSource >> aNbArgs;
       if (ok) {
diff --git a/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx b/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx
index efff092..eeddf8e 100644
--- a/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx
+++ b/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx
@@ -41,7 +41,7 @@ Standard_Boolean BinMPrsStd_AISPresentationDriver::Paste
                                  BinObjMgt_RRelocationTable&  ) const
 {
   Handle(TPrsStd_AISPresentation) anAtt = Handle(TPrsStd_AISPresentation)::DownCast(theTarget);
-  Standard_Integer aValue;
+  Standard_Integer aValue = 0;
 //Display status
   Standard_Boolean ok = theSource >> aValue;
   if (!ok) return ok;
@@ -66,7 +66,7 @@ Standard_Boolean BinMPrsStd_AISPresentationDriver::Paste
   else anAtt->UnsetMaterial();
 
 //Transparency
-  Standard_Real aRValue;
+  Standard_Real aRValue = 0.0;
   ok = theSource >> aRValue;
   if (!ok) return ok;
   if(aRValue != -1.)  anAtt->SetTransparency(aRValue);
diff --git a/src/BinMPrsStd/BinMPrsStd_PositionDriver.cxx b/src/BinMPrsStd/BinMPrsStd_PositionDriver.cxx
index d608680..7d134df 100644
--- a/src/BinMPrsStd/BinMPrsStd_PositionDriver.cxx
+++ b/src/BinMPrsStd/BinMPrsStd_PositionDriver.cxx
@@ -41,7 +41,7 @@ Standard_Boolean BinMPrsStd_PositionDriver::Paste
                                  BinObjMgt_RRelocationTable&  ) const
 {
   Handle(TDataXtd_Position) anAtt = Handle(TDataXtd_Position)::DownCast(theTarget);
-  Standard_Real aValue;
+  Standard_Real aValue = 0.0;
   Standard_Boolean ok = theSource >> aValue;
   if (!ok) return ok;
   gp_Pnt aPosition(0., 0., 0.);
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx
index e0e160d..59f3249 100644
--- a/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx
+++ b/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx
@@ -32,7 +32,7 @@ Standard_Boolean BinMXCAFDoc_AreaDriver::Paste(const BinObjMgt_Persistent& theSo
 					       BinObjMgt_RRelocationTable& ) const 
 {
   Handle(XCAFDoc_Area) anAtt = Handle(XCAFDoc_Area)::DownCast(theTarget);
-  Standard_Real aValue;
+  Standard_Real aValue = 0.0;
   Standard_Boolean isOk = theSource >> aValue;
   if(isOk)
     anAtt->Set(aValue);
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.cxx
index 63ece5f..dcc241c 100644
--- a/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.cxx
+++ b/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.cxx
@@ -32,7 +32,7 @@ Standard_Boolean BinMXCAFDoc_CentroidDriver::Paste(const BinObjMgt_Persistent& t
 						   BinObjMgt_RRelocationTable& /*theRelocTable*/) const
 {
   Handle(XCAFDoc_Centroid) anAtt = Handle(XCAFDoc_Centroid)::DownCast(theTarget);
-  Standard_Real x, y, z;
+  Standard_Real x =0.0, y = 0.0, z=0.0;
   Standard_Boolean isOk = theSource >> x >> y >> z;
   if(isOk) {
     gp_Pnt aPnt(x, y, z);
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.cxx
index b610f92..0191b0e 100644
--- a/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.cxx
+++ b/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.cxx
@@ -31,7 +31,7 @@ Standard_Boolean BinMXCAFDoc_ColorDriver::Paste(const BinObjMgt_Persistent& theS
 						BinObjMgt_RRelocationTable& /*theRelocTable*/) const 
 {
   Handle(XCAFDoc_Color) anAtt = Handle(XCAFDoc_Color)::DownCast(theTarget);
-  Standard_Real R, G, B;
+  Standard_Real R=0.0, G=0.0, B=0.0;
   Standard_Boolean isOk = theSource >> R >> G >> B;
   if(isOk) {
     anAtt->Set(R, G, B);
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx
index 3ce352f..cfb8e88 100644
--- a/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx
+++ b/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx
@@ -31,7 +31,7 @@ Standard_Boolean BinMXCAFDoc_VolumeDriver::Paste(const BinObjMgt_Persistent& the
 						 BinObjMgt_RRelocationTable& /*theRelocTable*/) const
 {
   Handle(XCAFDoc_Volume) anAtt = Handle(XCAFDoc_Volume)::DownCast(theTarget);
-  Standard_Real aVol;
+  Standard_Real aVol=0.0;
   Standard_Boolean isOk = theSource >> aVol;
   if(isOk)
     anAtt->Set(aVol);

-- 
OCE packaging



More information about the debian-science-commits mailing list