Pacify GCC 15 -Wunterminated-string-initialization
* src/fns.c (hexbuf_digest): * src/json.c (json_out_string): Add ATTRIBUTE_NONSTRING to character arrays that are not strings.
This commit is contained in:
parent
67ae179008
commit
e2fb12a40c
2 changed files with 2 additions and 2 deletions
|
@ -6014,7 +6014,7 @@ hexbuf_digest (char *hexbuf, void const *digest, int digest_size)
|
|||
|
||||
for (int i = digest_size - 1; i >= 0; i--)
|
||||
{
|
||||
static char const hexdigit[16] = "0123456789abcdef";
|
||||
static char const hexdigit[16] ATTRIBUTE_NONSTRING = "0123456789abcdef";
|
||||
int p_i = p[i];
|
||||
hexbuf[2 * i] = hexdigit[p_i >> 4];
|
||||
hexbuf[2 * i + 1] = hexdigit[p_i & 0xf];
|
||||
|
|
|
@ -323,7 +323,7 @@ json_out_string (json_out_t *jo, Lisp_Object str, int skip)
|
|||
{
|
||||
/* FIXME: this code is slow, make faster! */
|
||||
|
||||
static const char hexchar[16] = "0123456789ABCDEF";
|
||||
static const char hexchar[16] ATTRIBUTE_NONSTRING = "0123456789ABCDEF";
|
||||
ptrdiff_t len = SBYTES (str);
|
||||
json_make_room (jo, len + 2);
|
||||
json_out_byte (jo, '"');
|
||||
|
|
Loading…
Add table
Reference in a new issue