]> Savannah Git Hosting - gnulib.git/commitdiff
unilbrk tests: Avoid two gcc -Wparentheses warnings.
authorBruno Haible <bruno@clisp.org>
Mon, 16 Sep 2024 20:40:40 +0000 (22:40 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 16 Sep 2024 21:15:01 +0000 (23:15 +0200)
* tests/unilbrk/test-uc-possible-linebreaks.c (main): Add redundant
parentheses.

ChangeLog
tests/unilbrk/test-uc-possible-linebreaks.c

index a619271ded938e7b952f963bfc63b49d28421a30..792ca33836d0255a3e1ca36b66b9472e6ed47377 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-09-16  Bruno Haible  <bruno@clisp.org>
+
+       unilbrk tests: Avoid two gcc -Wparentheses warnings.
+       * tests/unilbrk/test-uc-possible-linebreaks.c (main): Add redundant
+       parentheses.
+
 2024-09-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        parse-datetime no longer depends on nstrftime
index cebead67237c661ae7ae780a487637938ea8f937..31bab9eb15a7dcfc34f2f57297aa1db417b3b6cf 100644 (file)
@@ -148,9 +148,9 @@ main (int argc, char *argv[])
                    the space.
                    Similarly when the first two characters at the start of the
                    text have property LBP_CM and LBP_ZWJ, respectively. (LB9).  */
-                if (!(((j == 1 || (j > 1 && (input[j - 2] >= 0x000A && input[j - 2] <= 0x000D || input[j - 2] == 0x0085)))
+                if (!(((j == 1 || (j > 1 && ((input[j - 2] >= 0x000A && input[j - 2] <= 0x000D) || input[j - 2] == 0x0085)))
                        && input[j - 1] == 0x0020)
-                      || ((j == 2 || (j > 2 && (input[j - 3] >= 0x000A && input[j - 3] <= 0x000D || input[j - 3] == 0x0085)))
+                      || ((j == 2 || (j > 2 && ((input[j - 3] >= 0x000A && input[j - 3] <= 0x000D) || input[j - 3] == 0x0085)))
                           && ((input[j - 2] == 0x0020 && input[j - 1] == 0x0020)
                               || (input[j - 2] == 0x0308 && input[j - 1] == 0x200D)
                               || (input[j - 2] == 0x200D && input[j - 1] == 0x0308)))))