From 6a6d70a3515559e332a39c65e69d5cb848aa5097 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 24 Oct 2023 18:40:07 -0700 Subject: [PATCH] tests/unistr/u16-chr-tests: pacify -Wcast-align * tests/unistr/test-chr.h (main): Redo types to pacify gcc -Wcast-align. --- ChangeLog | 4 ++++ tests/unistr/test-chr.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8af3088936..67ab92d10a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2023-10-24 Paul Eggert + tests/unistr/u16-chr-tests: pacify -Wcast-align + * tests/unistr/test-chr.h (main): Redo types to pacify + gcc -Wcast-align. + isnanl-tests, stdio-tests: pacify GCC -Wshadow * tests/test-isnanl.h (NWORDS): Remove. (memory_long_double): Do not redefine in an inner scope. diff --git a/tests/unistr/test-chr.h b/tests/unistr/test-chr.h index 7ee5dd2f84..228c7e6e9d 100644 --- a/tests/unistr/test-chr.h +++ b/tests/unistr/test-chr.h @@ -109,14 +109,14 @@ main (void) /* Check that uN_chr() does not read past the first occurrence of the byte being searched. */ { - char *page_boundary = (char *) zerosize_ptr (); + UNIT *page_boundary = zerosize_ptr (); size_t n; if (page_boundary != NULL) { for (n = 1; n <= 500 / sizeof (UNIT); n++) { - UNIT *mem = (UNIT *) (page_boundary - n * sizeof (UNIT)); + UNIT *mem = page_boundary - n; U_SET (mem, 'X', n); ASSERT (U_CHR (mem, n, 'U') == NULL); -- 2.39.5