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:
1 parent
bfebaf53d7
commit
9b0d735040
1 file changed
+3
@@ -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