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:
@@ -405,7 +405,7 @@ static Standard_Integer Draw_wait(Draw_Interpretor& , Standard_Integer n, const
|
||||
static unsigned int __stdcall CpuFunc (void * param)
|
||||
{
|
||||
clock_t aCurrent;
|
||||
while (1)
|
||||
for(;;)
|
||||
{
|
||||
Sleep (5);
|
||||
Standard_Real anUserSeconds, aSystemSeconds;
|
||||
|
@@ -1110,7 +1110,7 @@ static Standard_Real ParseFactor(char*& name)
|
||||
{
|
||||
Standard_Real x = ParseValue(name);
|
||||
|
||||
while (1) {
|
||||
for(;;) {
|
||||
char c = *name;
|
||||
if (c == '\0') return x;
|
||||
name++;
|
||||
@@ -1136,7 +1136,7 @@ static Standard_Real Parse(char*& name)
|
||||
{
|
||||
Standard_Real x = ParseFactor(name);
|
||||
|
||||
while (1) {
|
||||
for(;;) {
|
||||
char c = *name;
|
||||
if (c == '\0') return x;
|
||||
name++;
|
||||
|
@@ -1725,7 +1725,6 @@ void DrawWindow::Clear()
|
||||
HDC hDC = GetDC(win);
|
||||
HDC aWorkDC = myUseBuffer ? GetMemDC(hDC) : hDC;
|
||||
|
||||
int debug = GetROP2(aWorkDC);
|
||||
SaveDC(aWorkDC);
|
||||
SelectObject(aWorkDC,GetStockObject(BLACK_PEN));
|
||||
Rectangle(aWorkDC, 0, 0, WidthWin(), HeightWin());
|
||||
@@ -2048,7 +2047,7 @@ static DWORD WINAPI readStdinThreadFunc(VOID)
|
||||
{
|
||||
if (!Draw_IsConsoleSubsystem) return 1;
|
||||
|
||||
while (1) {
|
||||
for(;;) {
|
||||
while (console_semaphore != WAIT_CONSOLE_COMMAND)
|
||||
Sleep(100);
|
||||
//if (gets(console_command))
|
||||
|
Reference in New Issue
Block a user