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:
@@ -313,52 +313,52 @@ Handle(Interface_ParamSet) IGESData_GlobalSection::Params () const
|
||||
res->Append (text,lt, Interface_ParamText,0);
|
||||
|
||||
sprintf(nombre,"%d",theIntegerBits);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
sprintf(nombre,"%d",theMaxPower10Single);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
sprintf(nombre,"%d",theMaxDigitsSingle);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
sprintf(nombre,"%d",theMaxPower10Double);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
sprintf(nombre,"%d",theMaxDigitsDouble);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
MakeHollerith (theReceiveName,text,lt);
|
||||
res->Append (text,lt, Interface_ParamText,0);
|
||||
|
||||
Interface_FloatWriter::Convert (theScale,nombre,Standard_True,0.,0.,"%f","%f");
|
||||
// sprintf(nombre,"%f",theScale);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamReal,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamReal,0);
|
||||
|
||||
sprintf(nombre,"%d",theUnitFlag);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
MakeHollerith (theUnitName,text,lt);
|
||||
res->Append (text,lt, Interface_ParamText,0);
|
||||
|
||||
sprintf(nombre,"%d",theLineWeightGrad);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
Interface_FloatWriter::Convert (theMaxLineWeight,nombre,Standard_True,0.,0.,"%f","%f");
|
||||
// sprintf(nombre,"%f",theMaxLineWeight);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamReal,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamReal,0);
|
||||
|
||||
MakeHollerith (theDate,text,lt);
|
||||
res->Append (text,lt, Interface_ParamText,0);
|
||||
|
||||
Interface_FloatWriter::Convert (theResolution,nombre,Standard_True,0.,0.,"%g","%g");
|
||||
// sprintf(nombre,"%f",theResolution);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamReal,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamReal,0);
|
||||
|
||||
if (hasMaxCoord)
|
||||
Interface_FloatWriter::Convert (theMaxCoord,nombre,Standard_True,0.,0.,"%f","%f");
|
||||
// sprintf(nombre,"%f",theMaxCoord);
|
||||
else nombre[0] = '\0';
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamReal,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamReal,0);
|
||||
|
||||
MakeHollerith (theAuthorName,text,lt);
|
||||
res->Append (text,lt, Interface_ParamText,0);
|
||||
@@ -367,10 +367,10 @@ Handle(Interface_ParamSet) IGESData_GlobalSection::Params () const
|
||||
res->Append (text,lt, Interface_ParamText,0);
|
||||
|
||||
sprintf(nombre,"%d",theIGESVersion);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
sprintf(nombre,"%d",theDraftingStandard);
|
||||
res->Append (nombre,strlen(nombre),Interface_ParamInteger,0);
|
||||
res->Append (nombre,(Standard_Integer)strlen(nombre),Interface_ParamInteger,0);
|
||||
|
||||
if (!theLastChangeDate.IsNull()) {
|
||||
MakeHollerith (theLastChangeDate,text,lt);
|
||||
|
@@ -51,7 +51,7 @@ IGESData_IGESReaderData::IGESData_IGESReaderData
|
||||
void IGESData_IGESReaderData::AddGlobal
|
||||
(const Interface_ParamType atype, const Standard_CString aval)
|
||||
{
|
||||
theparh->Append(aval,strlen(aval),atype,0);
|
||||
theparh->Append(aval,(int)strlen(aval),atype,0);
|
||||
}
|
||||
|
||||
void IGESData_IGESReaderData::SetGlobalSection ()
|
||||
|
@@ -95,10 +95,10 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
//
|
||||
pstartline=(Standard_PCharacter)startline;
|
||||
//
|
||||
Standard_Integer lst = strlen (startline);
|
||||
Standard_Size lst = strlen (startline);
|
||||
if (lst == 0) return;
|
||||
if (thestar.IsNull()) thestar = new TColStd_HSequenceOfHAsciiString();
|
||||
if (lst <= MaxcarsG) {
|
||||
if (lst <= (Standard_Size)MaxcarsG) {
|
||||
thestar->Append (new TCollection_HAsciiString(startline));
|
||||
return;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
const Standard_Integer more)
|
||||
{
|
||||
Standard_Integer lnstr = lnval;
|
||||
if (lnstr <= 0) lnstr = strlen(val);
|
||||
if (lnstr <= 0) lnstr = (Standard_Integer)strlen(val);
|
||||
if (!thecurr.CanGet (lnstr + more + 1)) {
|
||||
// + 1 (18-SEP-1996) pour etre sur que le separateur n est pas en tete de ligne
|
||||
if (thesect < 3) thehead->Append(thecurr.Moved());
|
||||
|
Reference in New Issue
Block a user