forked from boostorg/system
Add __attribute__((__format__)) to snprintf
This attribute will check format string bugs and is required for clean compile if -Wformat-nonliteral is enabled.
This commit is contained in:
@@ -49,6 +49,9 @@ inline void snprintf( char * buffer, std::size_t len, char const * format, ... )
|
||||
|
||||
#else
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
__attribute__((__format__ (__printf__, 3, 4)))
|
||||
#endif
|
||||
inline void snprintf( char * buffer, std::size_t len, char const * format, ... )
|
||||
{
|
||||
va_list args;
|
||||
|
Reference in New Issue
Block a user