Warn for type mismatch for gmx printf like functions 3/3
[alexxy/gromacs.git] / src / gromacs / utility / fatalerror.h
index 329de245ddaf2dbace9d43db5d4ff57bdffbfce3..0f5ce2b50731e50e18143a91a4521d3dee55d8ad 100644 (file)
@@ -48,6 +48,7 @@
 #include <stdio.h>
 
 #include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/stringutil.h"
 
 /*! \brief
  * Debug log file.
@@ -173,7 +174,7 @@ gmx_fatal_mpi_va(int fatal_errno, const char *file, int line,
    \endcode
  */
 [[noreturn]] void
-gmx_fatal(int fatal_errno, const char *file, int line, const char *fmt, ...);
+gmx_fatal(int fatal_errno, const char *file, int line, gmx_fmtstr const char *fmt, ...) gmx_format(printf, 4, 5);
 /** Helper macro to pass first three parameters to gmx_fatal(). */
 #define FARGS 0, __FILE__, __LINE__
 
@@ -235,6 +236,6 @@ void _range_check(int n, int n_min, int n_max, const char *warn_str,
  * The message string should NOT start with "WARNING"
  * and should NOT end with a newline.
  */
-void gmx_warning(const char *fmt, ...);
+void gmx_warning(gmx_fmtstr const char *fmt, ...) gmx_format(printf, 1, 2);
 
 #endif