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

0024186: Eliminate remaining compiler warnings in MSVC++ 2010 64 bit with warning level 4

Eliminated some warnings of type C4267 (conversion from Type1 to Type2: possible loss of data); size_t to int explicit casts added.
Fixed warning C4267 and 4244 in OSD* files

Change in OSD_FileNode and OSD_File reverted since different handle types are needed on Unix and Windows
This commit is contained in:
omy
2013-09-26 17:20:52 +04:00
committed by bugmaster
parent b62b3e079f
commit 7dc9e04716
37 changed files with 93 additions and 100 deletions

View File

@@ -71,10 +71,7 @@ Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
const Standard_CString aval, const Interface_ParamType atype,
const Standard_Integer nument)
{
// Interface_FileParameter FP;
// FP.Init(aval,atype);
theparams->Append(aval,-1,atype,nument);
//thenbpar(num) ++; // SetValue(num,thenbpar(num)+1);
}
void Interface_FileReaderData::AddParam
@@ -82,10 +79,7 @@ Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
const TCollection_AsciiString& aval, const Interface_ParamType atype,
const Standard_Integer nument)
{
// Interface_FileParameter FP;
// FP.Init(aval,atype);
theparams->Append(aval.ToCString(),aval.Length(),atype,nument);
//thenbpar(num) ++; // .SetValue(num,thenbpar(num)+1);
}
void Interface_FileReaderData::AddParam
@@ -93,7 +87,6 @@ Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
const Interface_FileParameter& FP)
{
theparams->Append(FP);
//thenbpar(num) ++; // .SetValue(num,thenbpar(num)+1);
}
@@ -101,7 +94,6 @@ Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
(const Standard_Integer num, const Standard_Integer nump,
const Interface_FileParameter& FP)
{
//if (nump <= thenbpar.Value(num))
theparams->SetParam(thenumpar(num-1)+nump,FP);
}
@@ -109,7 +101,7 @@ Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
(const Standard_Integer num) const
{
if (num > 1) return (thenumpar(num) - thenumpar(num-1));
else if(num ==1) return thenumpar(num); //thenbpar(num);
else if(num ==1) return thenumpar(num);
else return theparams->NbParams();
}

View File

@@ -154,5 +154,5 @@ Standard_Integer Interface_FloatWriter::Convert (const Standard_Real val,
pText[j0+5] = lxp[4];
pText[j0+6] = '\0';
}
return strlen(text);
return (Standard_Integer)strlen(text);
}

View File

@@ -142,7 +142,7 @@ Interface_LineBuffer::Interface_LineBuffer (const Standard_Integer size)
// .... AJOUTS ....
void Interface_LineBuffer::Add (const Standard_CString text)
{ Add (text,strlen(text)); }
{ Add (text,(Standard_Integer)strlen(text)); }
void Interface_LineBuffer::Add
(const Standard_CString text, const Standard_Integer lntext)

View File

@@ -55,7 +55,7 @@ Standard_Integer Interface_ParamSet::Append (const Standard_CString val, const
Standard_Integer i;
if (thelnval + lnval + 1 > thelnres) {
// Reservation de caracteres insuffisante : d abord augmenter
Standard_Integer newres = thelnres*2 + lnval ;
Standard_Integer newres = (Standard_Integer)(thelnres*2 + lnval);
char* newval = new char[newres];
for (i = 0; i < thelnval; i++)
newval[i] = theval[i]; //szv#4:S4163:12Mar99 `<= thelnres` was wrong
@@ -88,7 +88,7 @@ Standard_Integer Interface_ParamSet::Append (const Standard_CString val, const
Interface_FileParameter& FP = thelist->ChangeValue(thenbpar);
FP.Init(&theval[thelnval],typ);
if (nument != 0) FP.SetEntityNumber(nument);
thelnval += (lnval+1);
thelnval += (Standard_Integer)(lnval+1);
}
return thenbpar;
}