1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0026171: Coding rules - eliminate -Wshorten-64-to-32 CLang warnings

This commit is contained in:
rkv
2021-11-11 00:06:46 +03:00
committed by inv
parent 2b40ee81d1
commit 57c5e9e895
28 changed files with 189 additions and 246 deletions

View File

@@ -690,7 +690,7 @@ TCollection_AsciiString Draw_Interpretor::GetLog ()
char buffer[BUFSIZE + 1];
for (;;)
{
int nbRead = read (myFDLog, buffer, BUFSIZE);
int nbRead = (int )read (myFDLog, buffer, BUFSIZE);
if (nbRead <= 0)
{
break;

View File

@@ -1084,7 +1084,7 @@ void Draw_Viewer::Select (Standard_Integer& theId,
theId = MAXVIEW;
while (theId >= MAXVIEW)
{
Standard_Integer aWindowNumber = 0;
long aWindowNumber = 0;
Draw_Window::GetNextEvent (theToWait, aWindowNumber, theX, theY, theButton);
if (theY < 0)
{

View File

@@ -853,7 +853,7 @@ void Draw_Window::DrawString (Standard_Integer theX, Standard_Integer theY,
}
ReleaseDC (myWindow, hDC);
#elif defined(HAVE_XLIB)
XDrawString (Draw_WindowDisplay, GetDrawable(), myBase->gc, theX, theY, (char* )theText, strlen(theText));
XDrawString (Draw_WindowDisplay, GetDrawable(), myBase->gc, theX, theY, (char* )theText, (int )strlen(theText));
#else
(void )theX;
(void )theY;

View File

@@ -249,10 +249,10 @@ public:
void Wait (Standard_Boolean theToWait = Standard_True);
#elif defined(__APPLE__)
Standard_Boolean IsEqualWindows (const Standard_Integer& theWindowNumber);
Standard_Boolean IsEqualWindows (const long theWindowNumber);
static void GetNextEvent (Standard_Boolean theWait,
Standard_Integer& theWindowNumber,
long& theWindowNumber,
Standard_Integer& theX,
Standard_Integer& theY,
Standard_Integer& theButton);

View File

@@ -552,13 +552,13 @@ Standard_Boolean Draw_Window::Save (Standard_CString theFileName) const
return isSuccess;
}
Standard_Boolean Draw_Window::IsEqualWindows (const Standard_Integer& theWindowNumber)
Standard_Boolean Draw_Window::IsEqualWindows (const long theWindowNumber)
{
return ([myWindow windowNumber] == theWindowNumber);
}
void Draw_Window::GetNextEvent (Standard_Boolean theWait,
Standard_Integer& theWindowNumber,
long& theWindowNumber,
Standard_Integer& theX,
Standard_Integer& theY,
Standard_Integer& theButton)