Project

General

Profile

Β« Previous | Next Β» 

Revision 209f8ba7

Added by mame (Yusuke Endoh) 10 months ago

[ruby/json] Prevent a warning of "a candidate for gnu_printf format attribute"

GCC 13 prints the following warning.

https://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20241127T001003Z.log.html.gz

compiling generator.c
generator.c: In function β€˜raise_generator_error’:
generator.c:91:5: warning: function β€˜raise_generator_error’ might be a candidate for β€˜gnu_printf’ format attribute [-Wsuggest-attribute=format]
   91 |     VALUE str = rb_vsprintf(fmt, args);
      |     ^~~~~

This change prevents the warning by specifying the format attribute.

https://github.com/ruby/json/commit/b8c1490846