diff options
| author | Paul Eggert | 2025-04-19 19:22:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2025-04-19 19:31:26 -0700 |
| commit | e2fb12a40ca2b90dfedbfe916ed8a87345ca89f1 (patch) | |
| tree | 888deb6e13ef34c63719b0969d3464066d05e420 /src/fns.c | |
| parent | 67ae1790088616777b352acffc63aeeb7ee50cb6 (diff) | |
| download | emacs-e2fb12a40ca2b90dfedbfe916ed8a87345ca89f1.tar.gz emacs-e2fb12a40ca2b90dfedbfe916ed8a87345ca89f1.zip | |
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.
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -6014,7 +6014,7 @@ hexbuf_digest (char *hexbuf, void const *digest, int digest_size) | |||
| 6014 | 6014 | ||
| 6015 | for (int i = digest_size - 1; i >= 0; i--) | 6015 | for (int i = digest_size - 1; i >= 0; i--) |
| 6016 | { | 6016 | { |
| 6017 | static char const hexdigit[16] = "0123456789abcdef"; | 6017 | static char const hexdigit[16] ATTRIBUTE_NONSTRING = "0123456789abcdef"; |
| 6018 | int p_i = p[i]; | 6018 | int p_i = p[i]; |
| 6019 | hexbuf[2 * i] = hexdigit[p_i >> 4]; | 6019 | hexbuf[2 * i] = hexdigit[p_i >> 4]; |
| 6020 | hexbuf[2 * i + 1] = hexdigit[p_i & 0xf]; | 6020 | hexbuf[2 * i + 1] = hexdigit[p_i & 0xf]; |