1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024059: Eliminate compiler warning C4701 in MSVC++ with warning level 4

Removing pPotentially uninitialized local variable
Got rid of most of warnings C4701: Potentially uninitialized local variable
Removed redundant variable definitions.
Refactored a part of AppParCurves_ResolConstraint CTOR.
Replaced 0. to Precision::Confusion for tolerance vars;
Changed values for min and max parameter vars;
Got rid of redundant variables' initialization.
This commit is contained in:
omy
2013-08-22 12:07:14 +04:00
committed by bugmaster
parent 99d99a6db2
commit 1d47d8d066
196 changed files with 671 additions and 817 deletions

View File

@@ -590,8 +590,8 @@ static int visos (Draw_Interpretor& di, Standard_Integer argc, const char** argv
Standard_Integer aLastInd = argc - 1;
Standard_Boolean isChanged = Standard_False;
Standard_Integer aNbUIsos;
Standard_Integer aNbVIsos;
Standard_Integer aNbUIsos = 0;
Standard_Integer aNbVIsos = 0;
if (aLastInd >= 3) {
Standard_Boolean isIsoOnPlane = Standard_False;

View File

@@ -312,11 +312,8 @@ static int VSize (Draw_Interpretor& di, Standard_Integer argc, const char** argv
Standard_Boolean ThereIsCurrent;
Standard_Real value;
Standard_Boolean hascol;
#ifdef DEB
Quantity_NameOfColor col;
#else
Quantity_NameOfColor col = Quantity_NOC_BLACK ;
#endif
// Verification des arguments
if ( argc>3 ) {di<<argv[0]<<" Syntaxe error"<<"\n"; return 1;}
@@ -3522,7 +3519,7 @@ static Standard_Integer VConnect(Draw_Interpretor& /*di*/,
TCollection_AsciiString aName (argv[anArgIter++]);
Handle(AIS_InteractiveObject) anOriginObject;
TCollection_AsciiString aColorString (argv[argc-1]);
Standard_CString aColorName;
Standard_CString aColorName = "";
Standard_Boolean hasColor = Standard_False;
if (aColorString.Search ("color=") != -1)
{
@@ -3702,7 +3699,7 @@ static Standard_Integer VConnectShape(Draw_Interpretor& /*di*/,
TCollection_AsciiString aName (argv[anArgIter++]);
Handle(AIS_InteractiveObject) anOriginShape;
TCollection_AsciiString aColorString(argv[argc-1]);
Standard_CString aColorName;
Standard_CString aColorName = "";
Standard_Boolean hasColor = Standard_False;
if (aColorString.Search ("color=") != -1)
{

View File

@@ -2502,26 +2502,20 @@ static int VSetBgMode(Draw_Interpretor& di, Standard_Integer argc, const char**
di << "use 'vinit' command before " << argv[0] << "\n";
return 1;
}
Aspect_FillMethod aFillType;
if (argc == 2)
Aspect_FillMethod aFillType = Aspect_FM_NONE;
const char* szType = argv[1];
if (strcmp(szType, "NONE" ) == 0) aFillType = Aspect_FM_NONE;
else if (strcmp(szType, "CENTERED") == 0) aFillType = Aspect_FM_CENTERED;
else if (strcmp(szType, "TILED" ) == 0) aFillType = Aspect_FM_TILED;
else if (strcmp(szType, "STRETCH" ) == 0) aFillType = Aspect_FM_STRETCH;
else
{
const char* szType = argv[1];
if (strcmp(szType, "NONE" ) == 0) aFillType = Aspect_FM_NONE;
else if (strcmp(szType, "CENTERED") == 0) aFillType = Aspect_FM_CENTERED;
else if (strcmp(szType, "TILED" ) == 0) aFillType = Aspect_FM_TILED;
else if (strcmp(szType, "STRETCH" ) == 0) aFillType = Aspect_FM_STRETCH;
else
{
di << "Wrong fill type : " << szType << "\n";
di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n";
return 1;
}
di << "Wrong fill type : " << szType << "\n";
di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n";
return 1;
}
Handle(V3d_View) V3dView = ViewerTest::CurrentView();
V3dView->SetBgImageStyle(aFillType, Standard_True);
return 0;
}
@@ -4267,7 +4261,7 @@ static Standard_Integer VZClipping (Draw_Interpretor& di,
return 1;
}
Handle(V3d_View) aView = ViewerTest::CurrentView();
V3d_TypeOfZclipping aZClippingMode;
V3d_TypeOfZclipping aZClippingMode = V3d_OFF;
if(argc==1)
{
TCollection_AsciiString aZClippingModeString;