Exit code change when using -Werror

Exit code is now sum of all errors, not just warnings as errors.
I'm can't think why the exit code wasn't like this in the first
place.
This commit is contained in:
William S Fulton 2019-07-29 07:12:04 +01:00
commit f69da524f0

View file

@ -1376,13 +1376,12 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) {
while (freeze) {
}
if ((werror) && (Swig_warn_count())) {
return Swig_warn_count();
}
delete lang;
return Swig_error_count();
int error_count = werror ? Swig_warn_count() : 0;
error_count += Swig_error_count();
return error_count;
}
/* -----------------------------------------------------------------------------