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

0024574: ICC compiler warnings on Windows

NCollection_UtfString and NCollection_UtfIterator classes are refactored to use methods overloading instead of switches to dispatch implementation depending on character (Unicode code unit) size.

ICC-specific preprocessor directives are added to avoid warnings.
Unused local functions and variables, class methods, unreachable statements, and extra throw() declarations reported by ICC are removed.
Usage of "expl" for name of local variable is avoided as it conflicts with standard C function "expl" defined in math.h as preprocessor macro.

Non-standard (MS-specific) argument envp is removed in definition of main() function on Windows.
Functions _main_ and _WinMain_ are renamed to Draw_Main and Draw_WinMain, respectively, to avoid using names reserved in C++.

Doxygen warning is fixed in XDE User's Guide.
This commit is contained in:
abv
2017-10-19 17:12:05 +03:00
committed by bugmaster
parent f6c2b39aac
commit cf0786daf1
22 changed files with 259 additions and 298 deletions

View File

@@ -46,26 +46,26 @@ static FDraw_InitAppli theDraw_InitAppli; //pointer to the Draw_InitAppli
#endif
#ifdef _WIN32
//=======================================================================
//NOTE: OCC11
// On Windows NT, both console (UNIX-like) and windowed (classical on
// WNT, with three separated windows - input, output and graphic)
// modes are supported.
// Depending on compilation mode of executable (CONSOLE or WINDOWS),
// either _main_ or _WinMain_ becomes entry point;
// either Draw_Main or Draw_WinMain becomes entry point;
// the further different behaviour of DRAW is determined by variable
// Draw_IsConsoleSubsystem which is set by _main_ only
// Draw_IsConsoleSubsystem which is set by Draw_Main only
//=======================================================================
extern Standard_Boolean Draw_IsConsoleSubsystem;
//=======================================================================
//function : _main_
//function : Draw_Main
//purpose :
//=======================================================================
Standard_Integer _main_ (int /*argc*/, char* argv[], char* /*envp*/[], const FDraw_InitAppli fDraw_InitAppli)
Standard_Integer Draw_Main (int /*argc*/, char* argv[], const FDraw_InitAppli fDraw_InitAppli)
{
Draw_IsConsoleSubsystem = Standard_True;
theDraw_InitAppli = fDraw_InitAppli;
@@ -83,11 +83,11 @@ Standard_Integer _main_ (int /*argc*/, char* argv[], char* /*envp*/[], const FDr
}
//=======================================================================
//function : _WinMain_
//function : Draw_WinMain
//purpose :
//=======================================================================
Standard_Integer _WinMain_ (HINSTANCE hInstance, HINSTANCE hPrevinstance, LPSTR /*lpCmdLine*/, int nCmdShow, const FDraw_InitAppli fDraw_InitAppli)
Standard_Integer Draw_WinMain (HINSTANCE hInstance, HINSTANCE hPrevinstance, LPSTR /*lpCmdLine*/, int nCmdShow, const FDraw_InitAppli fDraw_InitAppli)
{
theDraw_InitAppli = fDraw_InitAppli;
int aNbArgs = 0;
@@ -96,13 +96,15 @@ Standard_Integer _WinMain_ (HINSTANCE hInstance, HINSTANCE hPrevinstance, LPSTR
LocalFree (anArgVec);
return 0;
}
#else
//=======================================================================
//function : _main_
//function : Draw_Main
//purpose :
//=======================================================================
Standard_Integer _main_ (Standard_Integer argc, char* argv[], const FDraw_InitAppli fDraw_InitAppli)
Standard_Integer Draw_Main (Standard_Integer argc, char* argv[], const FDraw_InitAppli fDraw_InitAppli)
{
// MKV 01.02.05
#if ((TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)))
@@ -111,4 +113,5 @@ Standard_Integer _main_ (Standard_Integer argc, char* argv[], const FDraw_InitAp
Draw_Appli(argc, argv, fDraw_InitAppli);
return 0;
}
#endif