forked from Mirrors/openclonk
Add a dummy declaration to ssprintf
G++ doesn't allow attributes on function definitions for reasons. Add a declaration immediately before the definition so it works.issue1247
parent
e21a5bdd44
commit
95641b5fb0
|
@ -161,8 +161,9 @@ inline int osprintf(char *str, const char *fmt, ...)
|
|||
|
||||
// secure sprintf
|
||||
#define sprintf ssprintf
|
||||
template <size_t N> inline int ssprintf(char(&str)[N], const char *fmt, ...) GNUC_FORMAT_ATTRIBUTE_O;
|
||||
template <size_t N>
|
||||
inline int ssprintf(char(&str)[N], const char *fmt, ...) GNUC_FORMAT_ATTRIBUTE_O
|
||||
inline int ssprintf(char(&str)[N], const char *fmt, ...)
|
||||
{
|
||||
va_list args; va_start(args, fmt);
|
||||
int m = vsnprintf(str, N, fmt, args);
|
||||
|
|
Loading…
Reference in New Issue