mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Suppress gcc 15 unterminated-string-initialization warnings
This commit is contained in:
parent
545aafa2a2
commit
b42afa1dbc
12 changed files with 59 additions and 8 deletions
|
@ -40,6 +40,7 @@
|
|||
#include "ruby/util.h"
|
||||
#include "builtin.h"
|
||||
#include "shape.h"
|
||||
#include "ruby/internal/attr/nonstring.h"
|
||||
|
||||
#define BITSPERSHORT (2*CHAR_BIT)
|
||||
#define SHORTMASK ((1<<BITSPERSHORT)-1)
|
||||
|
@ -1515,7 +1516,7 @@ name_equal(const char *name, size_t nlen, const char *p, long l)
|
|||
static int
|
||||
sym2encidx(VALUE sym, VALUE val)
|
||||
{
|
||||
static const char name_encoding[8] = "encoding";
|
||||
RBIMPL_ATTR_NONSTRING() static const char name_encoding[8] = "encoding";
|
||||
const char *p;
|
||||
long l;
|
||||
if (rb_enc_get_index(sym) != ENCINDEX_US_ASCII) return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue