shithub: choc

Download patch

ref: 51a73a6c5c724353702e01c37a1d5dc8da377bd8
parent: 8b5ee89f13534b37b4da5a5e7fbfa4324f2b3fdf
author: Turo Lamminen <turotl@gmail.com>
date: Sat Feb 17 11:14:12 EST 2018

Add format string attribute to M_snprintf

--- a/src/m_misc.h
+++ b/src/m_misc.h
@@ -46,7 +46,7 @@
 boolean M_StringStartsWith(const char *s, const char *prefix);
 boolean M_StringEndsWith(const char *s, const char *suffix);
 int M_vsnprintf(char *buf, size_t buf_len, const char *s, va_list args);
-int M_snprintf(char *buf, size_t buf_len, const char *s, ...);
+int M_snprintf(char *buf, size_t buf_len, const char *s, ...) PRINTF_ATTR(3, 4);
 char *M_OEMToUTF8(const char *ansi);
 
 #endif