mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
[ruby/prism] Fix printf format attribute on ucrt64-mingw gcc 16.3
`__MINGW_PRINTF_FORMAT` is defined in stdio.h.
```
prism/buffer.c: In function 'pm_buffer_append_format':
prism/buffer.c:114:5: warning: function 'pm_buffer_append_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
114 | int result = vsnprintf(NULL, 0, format, arguments);
| ^~~
prism/buffer.c:123:9: warning: function 'pm_buffer_append_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
123 | vsnprintf(buffer->value + cursor, length, format, arguments);
| ^~~~~~~~~
```
https://github.com/ruby/prism/commit/72da47973e
This commit is contained in:
1 parent
2564ebb3c9
commit
b01ca2f752
1 file changed
+2
@@ -4,6 +4,8 @@
|
||||
#ifndef PRISM_COMPILER_FORMAT_H
|
||||
#define PRISM_COMPILER_FORMAT_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/**
|
||||
* Certain compilers support specifying that a function accepts variadic
|
||||
* parameters that look like printf format strings to provide a better developer
|
||||
|
||||
Reference in new issue
Block a user