Commit 66cd1138 authored by Brad King's avatar Brad King
Browse files

ConsoleBuf: Avoid unnecessary initializations in test code

Borland 5.8 warns about initializations that are immediately followed
by assignments.

Change-Id: I74320629a3112b919b68215ebe74870881b210c5
parent 3f69ac40
......@@ -368,11 +368,11 @@ static int testFile()
(errFile = createFile(L"stderrFile.txt")) == INVALID_HANDLE_VALUE) {
throw std::runtime_error("createFile failed!");
}
int length = 0;
DWORD bytesWritten = 0;
char buffer[200];
char buffer2[200];
int length;
if ((length = WideCharToMultiByte(TestCodepage, 0, UnicodeInputTestString, -1,
buffer, sizeof(buffer),
NULL, NULL)) == 0) {
......@@ -599,7 +599,7 @@ static int testConsole()
INPUT_RECORD inputBuffer[(sizeof(UnicodeInputTestString) /
sizeof(UnicodeInputTestString[0])) * 2];
memset(&inputBuffer, 0, sizeof(inputBuffer));
unsigned int i = 0;
unsigned int i;
for (i = 0; i < (sizeof(UnicodeInputTestString) /
sizeof(UnicodeInputTestString[0]) - 1); i++) {
writeInputKeyEvent(&inputBuffer[i*2], UnicodeInputTestString[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment