tar: tell the compiler that xm_max counts xm_map

A simpler alternative to a suggestion by Jeff Bindel in:
https://lists.gnu.org/r/bug-tar/2026-09/msg00006.html
* src/tar.h (struct xattr_map.xm_map):
Move to the end, and declare with _GL_ATTRIBUTE_COUNTED_BY (xm_max).
This commit is contained in:
Paul Eggert
2026-09-12 14:59:17 -07:00
parent 792e71ae2b
commit dd12f61628
+1 -1
View File
@@ -298,9 +298,9 @@ struct xattr_array
struct xattr_map
{
struct xattr_array *xm_map;
idx_t xm_size; /* Size of the xattr map */
idx_t xm_max; /* Max. number of entries in xattr_map */
struct xattr_array *xm_map _GL_ATTRIBUTE_COUNTED_BY (xm_max);
};
struct tar_stat_info