mirror of
https://github.com/boostorg/system.git
synced 2025-08-05 15:24:27 +02:00
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
|
#else
|
||||||
|
|
||||||
|
#if __GNUC__ >= 3
|
||||||
|
__attribute__((__format__ (__printf__, 3, 4)))
|
||||||
|
#endif
|
||||||
inline void snprintf( char * buffer, std::size_t len, char const * format, ... )
|
inline void snprintf( char * buffer, std::size_t len, char const * format, ... )
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
Reference in New Issue
Block a user