Avoid uninitialized variables

This commit is contained in:
Paul Cornett 2019-04-04 10:17:21 -07:00
parent e89cd4f2dd
commit ff01f4a5a8
2 changed files with 4 additions and 1 deletions

View File

@ -856,6 +856,7 @@ long MainWindow::DoSearch(void)
previous_poem_start = -1;
}
buf[0] = 0;
if (data_filename)
wxSprintf(buf, wxT("%s.dat"), data_filename);
@ -942,6 +943,7 @@ bool Compile(void)
int ch;
wxChar buf[100];
buf[0] = 0;
if (data_filename)
wxSprintf(buf, wxT("%s.dat"), data_filename);
@ -974,6 +976,7 @@ bool Compile(void)
} while (ch != EOF);
fclose(file);
buf[0] = 0;
if (index_filename)
wxSprintf(buf, wxT("%s.idx"), index_filename);

View File

@ -142,7 +142,7 @@ void wxCursor::InitFromStock( wxStockCursor cursorId )
*/
default:
wxFAIL_MSG(wxT("unsupported cursor type"));
// will use the standard one
qt_cur = Qt::ArrowCursor;
break;
}