Skip to content

Commit 2b76986

Browse files
committed
[LINT] error 438
Last value assigned to variable 'Symbol' not used Signed-off-by: Jocelyn Legault <jocelynlegault@gmail.com>
1 parent 37da9c9 commit 2b76986

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

PythonScript/src/ProcessExecute.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,24 +281,19 @@ DWORD WINAPI ProcessExecute::pipeReader(void *args)
281281

282282
DWORD bytesRead;
283283

284-
285284
char buffer[PIPE_READBUFSIZE];
286285
BOOL processFinished = FALSE;
287-
BOOL dataFinished = FALSE;
288286
int handleIndex;
289287

290-
while(!dataFinished)
288+
for(;;)
291289
{
292290
::PeekNamedPipe(pipeReaderArgs->hPipeRead, NULL, 0, NULL, &bytesRead, NULL);
293291

294292
if (processFinished && 0 == bytesRead)
295293
{
296-
dataFinished = TRUE;
297294
break;
298295
}
299296

300-
301-
302297
if (bytesRead > 0)
303298
{
304299
if (ReadFile(pipeReaderArgs->hPipeRead, buffer, PIPE_READBUFSIZE - 1, &bytesRead, NULL))
@@ -330,8 +325,6 @@ DWORD WINAPI ProcessExecute::pipeReader(void *args)
330325
break;
331326
}
332327
}
333-
334-
335328
}
336329

337330
CloseHandle(pipeReaderArgs->hPipeRead);

PythonScript/src/PyProducerConsumer.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ void PyProducerConsumer<DataT>::consumer()
123123
{
124124
HANDLE waitHandles[] = {m_dataAvailable, m_shutdown};
125125
bool queueEmpty;
126-
bool shutdownSignalled = false;
127-
while(!shutdownSignalled)
126+
for(;;)
128127
{
129128

130129
DWORD waitResult = WaitForMultipleObjects(2, waitHandles, false, INFINITE);
@@ -134,9 +133,6 @@ void PyProducerConsumer<DataT>::consumer()
134133
// Shutdown immediately
135134
// An alternative would be to "finish up" the queue
136135
// but we don't want to do that in PyScript - just close N++
137-
// This is set to avoid the C4127 conditional expression constant warning if
138-
// we use while(true)
139-
shutdownSignalled = true;
140136
break;
141137
}
142138
m_consuming = true;

0 commit comments

Comments
 (0)