mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
Suppress gcc 15 unterminated-string-initialization warnings
This commit is contained in:
parent
7e6bbc40c8
commit
e26e8423b5
11 changed files with 57 additions and 7 deletions
3
string.c
3
string.c
|
@ -45,6 +45,7 @@
|
|||
#include "ruby/util.h"
|
||||
#include "ruby_assert.h"
|
||||
#include "vm_sync.h"
|
||||
#include "ruby/internal/attr/nonstring.h"
|
||||
|
||||
#if defined HAVE_CRYPT_R
|
||||
# if defined HAVE_CRYPT_H
|
||||
|
@ -10993,7 +10994,7 @@ enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl, int cr)
|
|||
encidx = rb_enc_to_index(enc);
|
||||
|
||||
#define DEFAULT_REPLACE_CHAR(str) do { \
|
||||
static const char replace[sizeof(str)-1] = str; \
|
||||
RBIMPL_ATTR_NONSTRING() static const char replace[sizeof(str)-1] = str; \
|
||||
rep = replace; replen = (int)sizeof(replace); \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue