Warn for type mismatch for gmx printf like functions 1/3
[alexxy/gromacs.git] / src / gromacs / utility / smalloc.cpp
index e352fe5ab9ac0b54aacf4a1ca93c8f8a536cee2d..ca77fdd992bb83f33badd4acbfe280428daaacee 100644 (file)
@@ -201,7 +201,7 @@ void *save_malloc_aligned(const char *name, const char *file, int line,
     if (alignment > alignmentSize)
     {
         gmx_fatal(errno, __FILE__, __LINE__,
-                  "Cannot allocate aligned memory with alignment > %u bytes\n(called from file %s, line %d)", alignmentSize, file, line);
+                  "Cannot allocate aligned memory with alignment > %zu bytes\n(called from file %s, line %d)", alignmentSize, file, line);
     }
 
 
@@ -225,7 +225,7 @@ void *save_malloc_aligned(const char *name, const char *file, int line,
         if (p == nullptr)
         {
             gmx_fatal(errno, __FILE__, __LINE__,
-                      "Not enough memory. Failed to allocate %u aligned elements of size %u for %s\n(called from file %s, line %d)", nelem, elsize, name, file, line);
+                      "Not enough memory. Failed to allocate %zu aligned elements of size %zu for %s\n(called from file %s, line %d)", nelem, elsize, name, file, line);
         }
     }
     return p;