Pacify gcc -Wunterminated-string-initialization

This diagnostic is new to GCC 15.
* src/create.c (cachedir_file_p): Mark local as nonstring.
This commit is contained in:
Paul Eggert
2025-04-17 15:13:21 -07:00
parent aecf7146d3
commit 8921131877

View File

@@ -110,7 +110,7 @@ check_exclusion_tags (struct tar_stat_info const *st, char const **tag_file_name
bool bool
cachedir_file_p (int fd) cachedir_file_p (int fd)
{ {
static char const sig[43] static char const sig[43] ATTRIBUTE_NONSTRING
= "Signature: 8a477f597d28d172789f06886806bc55"; = "Signature: 8a477f597d28d172789f06886806bc55";
char tagbuf[sizeof sig]; char tagbuf[sizeof sig];
return (read (fd, tagbuf, sizeof sig) == sizeof sig return (read (fd, tagbuf, sizeof sig) == sizeof sig