* lib/unictype/block_test.c (uc_is_block):
Use compound literal, not cast.
---
 ChangeLog                 | 4 ++++
 lib/unictype/block_test.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5a5b39447a..38675c7da0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2026-05-10  Paul Eggert  <[email protected]>
 
+       unictype/block-test: pacify -Wuseless-cast
+       * lib/unictype/block_test.c (uc_is_block):
+       Use compound literal, not cast.
+
        regex: omit useless casts
        * lib/regex_internal.c (build_wcs_upper_buffer):
        Omit cast from char * to char *.
diff --git a/lib/unictype/block_test.c b/lib/unictype/block_test.c
index 702b56293d..738dcf54fd 100644
--- a/lib/unictype/block_test.c
+++ b/lib/unictype/block_test.c
@@ -32,7 +32,7 @@ bool
 uc_is_block (ucs4_t uc, const uc_block_t *block)
 {
   if (block != NULL)
-    return ((ucs4_t) (uc - block->start) <= block->end - block->start);
+    return ((ucs4_t) {uc - block->start} <= block->end - block->start);
   else
     return false;
 }
-- 
2.54.0


Reply via email to