Merge branch release-5-1
[alexxy/gromacs.git] / src / gromacs / fileio / warninp.cpp
index c247852c29b4c9633945f06d85cb115eb1ad66d0..d6231cfa31fcbdb2c4eff22b1813969aaa05a109 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -176,6 +176,11 @@ void check_warning_error(warninp_t wi, int f_errno, const char *file, int line)
     }
 }
 
+gmx_bool warning_errors_exist(warninp_t wi)
+{
+    return (wi->nwarn_error > 0);
+}
+
 void done_warning(warninp_t wi, int f_errno, const char *file, int line)
 {
     print_warn_count("note", wi->nwarn_note);
@@ -191,6 +196,11 @@ void done_warning(warninp_t wi, int f_errno, const char *file, int line)
                   wi->nwarn_warn);
     }
 
+    free_warning(wi);
+}
+
+void free_warning(warninp_t wi)
+{
     sfree(wi);
 }