Remove spurious display when there is zero preprocessor warning

issue#70
Sébastien Villemot 2013-03-05 12:53:37 +01:00
parent 8ba4a3a4d2
commit 70193c92b2
1 changed files with 4 additions and 2 deletions

View File

@ -640,8 +640,10 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool no_log, b
if (!no_warn)
{
mOutputFile << "disp('Note: " << warnings.countWarnings() << " warning(s) encountered in the preprocessor')" << endl
<< "if ~isempty(lastwarn)" << endl
if (warnings.countWarnings() > 0)
mOutputFile << "disp('Note: " << warnings.countWarnings() << " warning(s) encountered in the preprocessor')" << endl;
mOutputFile << "if ~isempty(lastwarn)" << endl
<< " disp('Note: warning(s) encountered in MATLAB/Octave code')" << endl
<< "end" << endl;
}