Skip to content

Commit 686dcb1

Browse files
authored
Merge pull request #713 from mame/prevent-printf-format-warning
Prevent a warning of "a candidate for gnu_printf format attribute"
2 parents dbd5042 + b8c1490 commit 686dcb1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/json/ext/generator/generator.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ static void raise_generator_error_str(VALUE invalid_object, VALUE str)
8484
#ifdef RBIMPL_ATTR_NORETURN
8585
RBIMPL_ATTR_NORETURN()
8686
#endif
87+
#ifdef RBIMPL_ATTR_FORMAT
88+
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
89+
#endif
8790
static void raise_generator_error(VALUE invalid_object, const char *fmt, ...)
8891
{
8992
va_list args;

0 commit comments

Comments
 (0)