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

0023947: Eliminate trivial compiler warnings in MSVC++ with warning level 4

Fix first subset of warnings (about 100)
- while(1) and similar constructs replaced by for(;;)
- some uninitialized variables corrected
Got rid of Warning C4189: local variable is initialised but not referenced
Corrected mistakes after getting rid of C4189 compiler warning
Corrected some mistakes that led to compiling errors
Fixed test case because of improvement message - removed unnecessary TODO.
Small fix: tabs have been replaced with whitespaces.
Added TODO for Windows platform
removed last TODO
Corrected mistakes, returned some #ifdef DEB code, fixed test case .
Restoring a few places which have been modified too much
Small grammar fix
Deleted unnecessary puts in bugs/end
This commit is contained in:
omy
2013-07-12 12:37:38 +04:00
parent a8195d65ba
commit 302f96fb0d
189 changed files with 455 additions and 1010 deletions

View File

@@ -172,10 +172,9 @@ void XmlMDataStd_IntegerArrayDriver::Paste
str.Allocate(12 * intArray.Length() + 1);
Standard_Integer i = aL;
while (1)
for (;;)
{
const Standard_Integer& intValue = intArray.Value(i);
iChar += Sprintf(&(str[iChar]), "%d ", intValue);
iChar += Sprintf(&(str[iChar]), "%d ", intArray.Value(i));
if (i >= anU)
break;
++i;

View File

@@ -733,7 +733,7 @@ void XmlMDataStd_NamedDataDriver::Paste(const Handle(TDF_Attribute)& theSource,
//Value = Array
TCollection_AsciiString aValueStr2;
Standard_Integer j = anArr1.Lower();
while (1) {
for(;;) {
aValueStr2 += TCollection_AsciiString(anArr1.Value(j));
if (j >= anArr1.Upper()) break;
aValueStr2 += ' ';
@@ -762,7 +762,7 @@ void XmlMDataStd_NamedDataDriver::Paste(const Handle(TDF_Attribute)& theSource,
//Value = Array
TCollection_AsciiString aValueStr2;
Standard_Integer j = anArr1.Lower();
while (1) {
for(;;) {
#ifndef OCC6010
aValueStr2 += TCollection_AsciiString(anArr1.Value(j));
#else

View File

@@ -174,10 +174,9 @@ void XmlMDataStd_RealArrayDriver::Paste (const Handle(TDF_Attribute)& theSource,
str.Allocate(25 * realArray.Length() + 1);
Standard_Integer i = aL;
while (1)
for (;;)
{
const Standard_Real& dblValue = realArray.Value(i);
iChar += Sprintf(&(str[iChar]), "%.17g ", dblValue);
iChar += Sprintf(&(str[iChar]), "%.17g ", realArray.Value(i));
if (i >= anU)
break;
++i;