diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index adf3aa659b..77510ace07 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -62,7 +62,8 @@ bool wxTextFile::OnExists() const bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode OpenMode) { wxFile::OpenMode FileOpenMode = wxFile::read; - + int nAssertVal = 0; + switch (OpenMode) { case ReadAccess : @@ -72,7 +73,7 @@ bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode Open FileOpenMode = wxFile::write; break; default : - wxASSERT(0); // Should not happen. + wxASSERT(nAssertVal); // Should not happen. break; }