wc: make sure input buffer for neon 'wc -l' is aligned

* src/wc_neon.c (wc_lines_neon): Use alignas.
This commit is contained in:
Collin Funk committed 2026-03-16 12:20:38 -07:00
1 parent 9b855166ed
commit 9b29c9c899
1 file changed
+1 -1
+1 -1
View File
@@ -35,7 +35,7 @@ wc_lines_neon (int fd)
while (true)
{
unsigned char neon_buf[IO_BUFSIZE];
unsigned char alignas (16) neon_buf[IO_BUFSIZE];
ssize_t bytes_read = read (fd, neon_buf, sizeof neon_buf);
if (bytes_read <= 0)
return (struct wc_lines) { bytes_read == 0 ? 0 : errno, lines, bytes };